mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-19 09:42:11 +03:00
Closing streams using IOUtils.closeQuietly
Fixed badly handled stream found in the meanwhile
This commit is contained in:
@ -21,6 +21,7 @@
|
||||
*/
|
||||
package processing.app.helpers;
|
||||
|
||||
import org.apache.commons.compress.utils.IOUtils;
|
||||
import processing.app.legacy.PApplet;
|
||||
|
||||
import java.io.*;
|
||||
@ -72,9 +73,7 @@ public class PreferencesMap extends LinkedHashMap<String, String> {
|
||||
fileInputStream = new FileInputStream(file);
|
||||
load(fileInputStream);
|
||||
} finally {
|
||||
if (fileInputStream != null) {
|
||||
fileInputStream.close();
|
||||
}
|
||||
IOUtils.closeQuietly(fileInputStream);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user