-
Notifications
You must be signed in to change notification settings - Fork 258
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure PackedFile is always closed and remove PackedFile.finalize()
Almost all `PackedFile` instances are wrapped in a try-with-resources to ensure they are always closed. The one exception guarantees the instance is closed in a `finally` block. The following places used to (at least partially) rely on PackedFile.finalize() but now use try-with-resources: - `ImageFileImagePanelModel.getDecorations()` - `PersistenceUtils.loadCampaignProperties()` - `PackedFile` The following place used to call `PackedFile.close()` in a `finally` block now uses try-with-resources: - `PersistenceUtil.loadCampaign()` The following place still uses a `finally` block because there is extra logic surrounding the close() call: - `PersistenceUtil.saveCampaign()`
- Loading branch information
1 parent
5811998
commit d8fb5c2
Showing
4 changed files
with
17 additions
and
28 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
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
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
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