elharo opened a new issue, #519:
URL: https://github.com/apache/maven-ear-plugin/issues/519

   ## Description
   
   In `AbstractEarMojo.java:317`, `isArtifactRegistered()` can throw a 
NullPointerException:
   
   ```java
   return currentList.stream().anyMatch(em -> em.getArtifact().equals(a));
   ```
   
   `EarModule.getArtifact()` is documented as returning `null` until the 
artifact is resolved. If a module in `currentList` has not been resolved, 
`.getArtifact()` returns null and `null.equals(a)` throws an NPE.
   
   ## Expected behavior
   
   Add a null guard:
   
   ```java
   return currentList.stream().anyMatch(em -> em.getArtifact() != null && 
em.getArtifact().equals(a));
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to