Pankraz76 commented on code in PR #2458:
URL: https://github.com/apache/maven/pull/2458#discussion_r2134733349


##########
impl/maven-core/src/main/java/org/apache/maven/project/MavenProject.java:
##########
@@ -861,7 +861,7 @@ public void addLicense(License license) {
     }
 
     public void setArtifacts(Set<Artifact> artifacts) {
-        this.artifacts = artifacts;

Review Comment:
   current tests fail to make field `final`.
   this need be be investigated further.



##########
impl/maven-core/src/main/java/org/apache/maven/project/MavenProject.java:
##########
@@ -861,7 +861,7 @@ public void addLicense(License license) {
     }
 
     public void setArtifacts(Set<Artifact> artifacts) {
-        this.artifacts = artifacts;
+        this.artifacts = Objects.requireNonNull(artifacts);

Review Comment:
   avoid `NPE`; apply `GIGO`.



-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to