Skip to content

Commit

Permalink
fix(host): avoid NPE if a JAXBException occurs on scanner execution
Browse files Browse the repository at this point in the history
  • Loading branch information
DropSnorz committed Mar 31, 2023
1 parent 993f373 commit 9fcba8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ protected TaskResult call() throws Exception {
}
}

log.debug(collectedPluginFiles.size() + " plugins collected");
log.info(collectedPluginFiles.size() + " plugins collected");

//Save all discovered symlinks
symlinkDAO.saveAll(collectedSymlinks);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ private List<NativePlugin> createPluginsFromCommandOutput(String output) {
outputXML = outputXML.strip();

JuceXMLPlugin plugin = createJucePluginFromRawXml(outputXML);
plugins.add(plugin.toNativePlugin());
if (plugin != null) {
plugins.add(plugin.toNativePlugin());
}

} else {
log.trace("No XML tag can be extracted from part {} for plugin", i);
Expand Down Expand Up @@ -209,7 +211,7 @@ private JuceXMLPlugin createJucePluginFromRawXml(String xml) {

} catch (JAXBException e) {
log.error("Error during XML mapping", e);
log.debug(xml);
log.error(xml);
return null;
}
}
Expand Down

0 comments on commit 9fcba8e

Please sign in to comment.