-
Notifications
You must be signed in to change notification settings - Fork 74
v0.2.53..v0.2.54 changeset MultipartSerializer.java
Garret Voltz edited this page Mar 31, 2020
·
1 revision
diff --git a/hoot-services/src/main/java/hoot/services/utils/MultipartSerializer.java b/hoot-services/src/main/java/hoot/services/utils/MultipartSerializer.java
index fe3959e..b79b72f 100644
--- a/hoot-services/src/main/java/hoot/services/utils/MultipartSerializer.java
+++ b/hoot-services/src/main/java/hoot/services/utils/MultipartSerializer.java
@@ -22,7 +22,7 @@
* This will properly maintain the copyright information. DigitalGlobe
* copyrights will be updated automatically.
*
- * @copyright Copyright (C) 2016, 2017 DigitalGlobe (http://www.digitalglobe.com/)
+ * @copyright Copyright (C) 2016, 2017, 2020 DigitalGlobe (http://www.digitalglobe.com/)
*/
package hoot.services.utils;
@@ -75,6 +75,7 @@ public final class MultipartSerializer {
try (InputStream fileStream = fileItem.getEntityAs(InputStream.class)) {
FileUtils.copyInputStreamToFile(fileStream, uploadedFile);
+ fileStream.close();
}
catch (Exception ioe) {
throw new RuntimeException("Error saving file to disk: " + uploadedFile, ioe);