Skip to content

Commit

Permalink
fix stuffs
Browse files Browse the repository at this point in the history
  • Loading branch information
natanfudge committed Jan 6, 2023
1 parent e2b6737 commit 0621a82
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import java.util.concurrent.ExecutionException;
import java.util.zip.GZIPOutputStream;

@SuppressWarnings("ConstantValue")
public class CrashyUpload {

private enum CrashyMode {
Expand All @@ -36,6 +37,7 @@ private enum CrashyMode {
public static CompletableFuture<String> uploadToCrashy(String text) throws IOException {
try {
var prefix = http + "://" + crashyDomain;

var promise = java11PostAsync(prefix + "/uploadCrash", gzip(text)).thenApply(response -> {
int statusCode = response.statusCode();
String responseBody = response.body();
Expand All @@ -55,10 +57,10 @@ public static CompletableFuture<String> uploadToCrashy(String text) throws IOExc
};
});

// var res = promise.get();
// promise.get();
return promise;

} catch (InterruptedException e) {
} catch (InterruptedException/* | ExecutionException*/ e) {
throw new RuntimeException(e);
}
}
Expand Down

0 comments on commit 0621a82

Please sign in to comment.