Skip to content

Commit

Permalink
Add null check (#9434)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurit authored Sep 11, 2023
1 parent 9015f9c commit f7128b0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ private static String getAppNamePropertyFromStream(InputStream in) {
@Nullable
private String loadFromClasspath(String filename, Function<InputStream, String> parser) {
try (InputStream in = system.openClasspathResource(filename)) {
return parser.apply(in);
return in != null ? parser.apply(in) : null;
} catch (Exception e) {
return null;
}
Expand Down

0 comments on commit f7128b0

Please sign in to comment.