forked from spring-guides/gs-uploading-files
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Seal up leak when opening input stream using try-resource construct
Spring Framework's `MultipartFile.getInputStream` clearly states "The user is responsible for closing the returned stream.". This patch uses Java 7's try-with-resources construct to grab it as an `InputStream` and then use it for the copy operation. Resolves spring-guides#43
- Loading branch information
Showing
1 changed file
with
6 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters