Skip to content

Commit

Permalink
Close InputStream after version number loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
liry committed Feb 7, 2016
1 parent 8010e82 commit 94f04e0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/com/brianmcmichael/sagu/SAGUUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ private SAGUUtils() {
*/
static String loadVersionNumber() {
final Properties properties = new Properties();
final InputStream resourceIS = SAGU.class.getResourceAsStream("/version.properties");
try {
try(final InputStream resourceIS = SAGU.class.getResourceAsStream("/version.properties")) {
properties.load(resourceIS);
} catch (IOException e) {
e.printStackTrace();
Expand Down

0 comments on commit 94f04e0

Please sign in to comment.