elharo commented on code in PR #549:
URL: https://github.com/apache/maven-ear-plugin/pull/549#discussion_r3843450458
##########
src/main/java/org/apache/maven/plugins/ear/AbstractEarMojo.java:
##########
@@ -313,8 +313,9 @@ public String getOutputFileNameMapping() {
return outputFileNameMapping;
}
- private static boolean isArtifactRegistered(Artifact a, List<EarModule>
currentList) {
- return currentList.stream().anyMatch(em -> em.getArtifact().equals(a));
+ static boolean isArtifactRegistered(Artifact artifact, List<EarModule>
currentList) {
+ return currentList.stream()
+ .anyMatch(em -> em.getArtifact() != null &&
em.getArtifact().equals(artifact));
Review Comment:
Check me but I think this is simpler if you just flip the comparison:
```
em -> artifact.equals(em.getArtifact())
```
--
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]