mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-31 02:05:28 +00:00
#798 close file streams after export
This commit is contained in:
@@ -1119,7 +1119,9 @@ public class CommandLineArgumentParser {
|
||||
String xml = Helper.readTextFile(args.pop());
|
||||
SWF swf = new SWF();
|
||||
new SwfXmlImporter().importSwf(swf, xml);
|
||||
swf.saveTo(new BufferedOutputStream(new FileOutputStream(args.pop())));
|
||||
try (FileOutputStream fos = new FileOutputStream(new File(args.pop()))) {
|
||||
swf.saveTo(new BufferedOutputStream(fos));
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(CommandLineArgumentParser.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user