Skip to content

Commit

Permalink
fix: requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
0utplay committed Jul 25, 2024
1 parent 89c8916 commit 290ee00
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package eu.cloudnetservice.driver.template.defaults;

import eu.cloudnetservice.common.concurrent.TaskUtil;
import eu.cloudnetservice.common.io.FileUtil;
import eu.cloudnetservice.common.io.ListenableOutputStream;
import eu.cloudnetservice.common.io.ZipUtil;
Expand Down Expand Up @@ -97,7 +98,7 @@ public boolean deployDirectory(
*/
@Override
public boolean deploy(@NonNull ServiceTemplate target, @NonNull InputStream inputStream) {
return this.deployAsync(target, inputStream).join();
return TaskUtil.getOrDefault(this.deployAsync(target, inputStream), false);
}

/**
Expand All @@ -123,7 +124,7 @@ public boolean deploy(@NonNull ServiceTemplate target, @NonNull InputStream inpu
*/
@Override
public @Nullable InputStream zipTemplate(@NonNull ServiceTemplate template) {
return this.zipTemplateAsync(template).join();
return TaskUtil.getOrDefault(this.zipTemplateAsync(template), null);
}

@Override
Expand Down Expand Up @@ -199,7 +200,7 @@ public boolean deploy(@NonNull ServiceTemplate target, @NonNull InputStream inpu
@NonNull ServiceTemplate template,
@NonNull String path
) throws IOException {
return this.newInputStreamAsync(template, path).join();
return TaskUtil.getOrDefault(this.newInputStreamAsync(template, path), null);
}

@Override
Expand Down

0 comments on commit 290ee00

Please sign in to comment.