Skip to content

Commit

Permalink
Avoid unlikely NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsbasjes committed Nov 23, 2018
1 parent 1620a1a commit beb5c55
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -277,8 +277,10 @@ public void loadResources(String resourceString) {
try {
Resource resource = resourceEntry.getValue();
String filename = resource.getFilename();
maxFilenameLength = Math.max(maxFilenameLength, filename.length());
loadResource(yaml, resource.getInputStream(), filename);
if (filename != null) {
maxFilenameLength = Math.max(maxFilenameLength, filename.length());
loadResource(yaml, resource.getInputStream(), filename);
}
} catch (IOException e) {
throw new InvalidParserConfigurationException("Error reading resources: " + e.getMessage(), e);
}
Expand Down

0 comments on commit beb5c55

Please sign in to comment.