Menu

#582 instantiation of ConfigurationWriter should be closed in a finally block

v5.2
closed-fixed
None
5
2016-10-23
2015-09-10
wangsong
No

In method saveConfiguration() of class ProGuardGUI(\proguard5.2.1\src\proguard\gui\ProGuardGUI.java).

The instantiation of ConfigurationWriter (writer) should be closed in a finally block.
While in this code snippet, the writer was closed in a try block.

try{
// Save the configuration file.
ConfigurationWriter writer = new ConfigurationWriter(file);
writer.write(getProGuardConfiguration());
writer.close();
}
catch (Exception ex)
...
}

Discussion

  • Eric Lafortune

    Eric Lafortune - 2015-09-10

    You're right, thanks. That was a bit sloppy of me. I've fixed it for the upcoming ProGuard 5.3.

     
  • Eric Lafortune

    Eric Lafortune - 2015-09-10
    • status: open --> open-fixed
     
  • Eric Lafortune

    Eric Lafortune - 2016-10-23
    • Status: open-fixed --> closed-fixed
     

Log in to post a comment.