Skip to content

Commit

Permalink
fixed possible NPE in HealthUtils, closes #280
Browse files Browse the repository at this point in the history
  • Loading branch information
albogdano committed Jun 18, 2024
1 parent d0648d9 commit 686eb4d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ private String loadConfigFile(String confFile) throws IOException {
try (InputStream ref = getClass().getClassLoader().getResourceAsStream("reference.conf");
InputStream config = Optional.ofNullable(Para.getFileStore().load(confFile)).orElse(ref)) {
return new String(config.readAllBytes(), StandardCharsets.UTF_8);
} catch (Exception e) {
return "";
}
}

Expand Down

0 comments on commit 686eb4d

Please sign in to comment.