Skip to content

Commit c942672

Browse files
authored
Explicitly close input stream. (#216)
1 parent fde3e6a commit c942672

File tree

1 file changed

+2
-0
lines changed
  • input-stream/src/main/java/software/amazon/s3/analyticsaccelerator/util

1 file changed

+2
-0
lines changed

input-stream/src/main/java/software/amazon/s3/analyticsaccelerator/util/StreamUtils.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ public static byte[] toByteArray(ObjectContent objectContent) {
4343
while ((numBytesRead = inStream.read(buffer, 0, buffer.length)) != -1) {
4444
outStream.write(buffer, 0, numBytesRead);
4545
}
46+
47+
inStream.close();
4648
} catch (IOException e) {
4749
throw new RuntimeException(e);
4850
}

0 commit comments

Comments
 (0)