Skip to content

Commit

Permalink
Merge pull request #27053 from geoand/vertx-is
Browse files Browse the repository at this point in the history
Replace InputStream bytes with InputStream.readAllBytes in Vert.x
  • Loading branch information
geoand authored Aug 1, 2022
2 parents 7b73bc7 + 5026a2d commit f224e25
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import static io.quarkus.vertx.core.runtime.context.VertxContextSafetyToggle.setContextSafe;
import static io.quarkus.vertx.core.runtime.context.VertxContextSafetyToggle.setCurrentContextSafe;

import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
Expand Down Expand Up @@ -998,13 +997,7 @@ private static String findKeystoreFileType(Path storePath) {
}

private static byte[] doRead(InputStream is) throws IOException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
byte[] buf = new byte[1024];
int r;
while ((r = is.read(buf)) > 0) {
out.write(buf, 0, r);
}
return out.toByteArray();
return is.readAllBytes();
}

private static HttpServerOptions createHttpServerOptions(
Expand Down

0 comments on commit f224e25

Please sign in to comment.