Skip to content

Commit

Permalink
Merge pull request #4902 from machi1990/fix/npe-platform-desc-json-pl…
Browse files Browse the repository at this point in the history
…ugin

fix: add a NPE check for overridable description files
  • Loading branch information
geoand authored Oct 27, 2019
2 parents 69ade9d + 46fd781 commit fccd696
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,17 @@ public void execute() throws MojoExecutionException, MojoFailureException {
// And add the list of extensions
platformJson.add("extensions", extListJson.build());

theRest.forEach((key, item) -> {
// Ignore the two keys we are explicitly managing
// but then add anything else found.
// TODO: make a real merge if needed eventually.
if (!"bom".equals(key) && !"extensions".equals(key)) {
platformJson.add(key, item);
if (theRest != null) {
theRest.forEach((key, item) -> {
// Ignore the two keys we are explicitly managing
// but then add anything else found.
// TODO: make a real merge if needed eventually.
if (!"bom".equals(key) && !"extensions".equals(key)) {
platformJson.add(key, item);

}
});
}
});
}

// Write the JSON to the output file
final File outputDir = outputFile.getParentFile();
Expand Down

0 comments on commit fccd696

Please sign in to comment.