Merge pull request #5621 from holgerl/patch-1

FileOutputStream is never closed
This commit is contained in:
Loredana Crusoveanu
2018-12-15 18:13:47 +02:00
committed by GitHub

View File

@@ -45,6 +45,7 @@ public class FileDownload {
FileOutputStream fileOutputStream = new FileOutputStream(localFilename); FileChannel fileChannel = fileOutputStream.getChannel()) {
fileChannel.transferFrom(readableByteChannel, 0, Long.MAX_VALUE);
fileOutputStream.close();
}
}