Skip to content

Commit

Permalink
minor robustness refinements
Browse files Browse the repository at this point in the history
  • Loading branch information
edeso committed Jul 21, 2024
1 parent 2069b02 commit 88ad8d5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/com/vividsolutions/jump/I18N.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,11 @@ public ResourceBundle newBundle(String baseName, Locale locale, String format, C
if (stream != null) {
try {
bundle = new PropertyResourceBundle(new InputStreamReader(stream, encoding));
} finally {
}
catch (Exception e) {
Logger.error(resourceName, e);
}
finally {
stream.close();
}
}
Expand Down Expand Up @@ -447,7 +451,7 @@ public String get(final String label, final Object... objects) {
text = getInstance().getValue(text.substring(3).trim());

// no params, nothing to parse
if (objects.length < 1)
if (objects == null || objects.length < 1)
return text;

// parse away
Expand Down

0 comments on commit 88ad8d5

Please sign in to comment.