Skip to content

Commit 54efd60

Browse files
committed
cleanup
1 parent c6e1e31 commit 54efd60

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

client/src/test/java/org/asynchttpclient/AutomaticDecompressionTest.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public void handle(HttpExchange exchange)
6161
out.write(compressedData, 0, (int) n);
6262
out.flush();
6363
out.close();
64-
exchange.close();
6564
}
6665
});
6766

@@ -72,14 +71,10 @@ public void handle(HttpExchange exchange)
7271
exchange.getResponseHeaders().set("Content-Encoding", "gzip");
7372
exchange.sendResponseHeaders(200, 0);
7473
OutputStream out = exchange.getResponseBody();
75-
try {
76-
GZIPOutputStream gzip = new GZIPOutputStream(out);
77-
gzip.write(UNCOMPRESSED_PAYLOAD.getBytes(StandardCharsets.UTF_8));
78-
gzip.flush();
79-
gzip.close();
80-
} catch (Exception exception) {
81-
exception.printStackTrace();
82-
}
74+
GZIPOutputStream gzip = new GZIPOutputStream(out);
75+
gzip.write(UNCOMPRESSED_PAYLOAD.getBytes(StandardCharsets.UTF_8));
76+
gzip.flush();
77+
gzip.close();
8378
}
8479
});
8580

0 commit comments

Comments
 (0)