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
commit 06d925e90d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

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();
}
}