Description
In AbstractEarMojo.java:329-364, multiple calls to jboss.getChild(...) are not null-checked before calling .getValue():
- Line 329:
jboss.getChild(JbossConfiguration.VERSION).getValue() — NPE if <version> missing
- Lines 334-335:
jboss.getChild(JbossConfiguration.SECURITY_DOMAIN).getValue() — NPE if missing
- Lines 336-337:
jboss.getChild(JbossConfiguration.UNAUHTHENTICTED_PRINCIPAL).getValue() — NPE if missing
- Lines 339-340:
jboss.getChild(JbossConfiguration.LOADER_REPOSITORY).getValue() — NPE if missing
- Lines 349, 351, 363-364: Same pattern
Lines 354-355 of the same method prove that getChild() can return null, as the author already null-checks it for dataSources there. The other 7+ calls are inconsistent and will throw NPE if those config elements are absent.
Expected behavior
Add null checks consistent with the existing dataSources handling pattern.
Description
In
AbstractEarMojo.java:329-364, multiple calls tojboss.getChild(...)are not null-checked before calling.getValue():jboss.getChild(JbossConfiguration.VERSION).getValue()— NPE if<version>missingjboss.getChild(JbossConfiguration.SECURITY_DOMAIN).getValue()— NPE if missingjboss.getChild(JbossConfiguration.UNAUHTHENTICTED_PRINCIPAL).getValue()— NPE if missingjboss.getChild(JbossConfiguration.LOADER_REPOSITORY).getValue()— NPE if missingLines 354-355 of the same method prove that
getChild()can return null, as the author already null-checks it fordataSourcesthere. The other 7+ calls are inconsistent and will throw NPE if those config elements are absent.Expected behavior
Add null checks consistent with the existing
dataSourceshandling pattern.