Skip to content

Commit

Permalink
Release 1.3.2: Properly handle inputStream resource management
Browse files Browse the repository at this point in the history
  • Loading branch information
StrongestNumber9 committed Dec 20, 2021
1 parent 1f3f307 commit 274766f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/main/java/com/teragrep/jla_04/RelpConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,8 @@ private void initLogger() {
System.out.println("Can't find properties file at " + configpath);
return;
}
FileInputStream inputStream = null;
try {
inputStream = new FileInputStream(configpath);
try(FileInputStream inputStream = new FileInputStream(configpath)) {
LogManager.getLogManager().readConfiguration(inputStream);
inputStream.close();
} catch (Exception e) {
e.printStackTrace();
}
Expand Down

0 comments on commit 274766f

Please sign in to comment.