mthmulders commented on a change in pull request #643:
URL: https://github.com/apache/maven/pull/643#discussion_r776671359



##########
File path: 
maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/RelocatedArtifact.java
##########
@@ -86,6 +86,39 @@ public String getVersion()
         }
     }
 
+    @Override

Review comment:
       On a related note, why is it necessary to override these setters? I can 
see that in certain conditions, they will create a new instance of the 
`RelocatedArtifact` class rather than mutating the existing one. In general: 
yay for immutability!
   
   But the Maven codebase usually assumes a `setX` method to mutate the object 
it is called upon and ignores the return value (if any). So what problem does 
it solve, and are we sure that whenever we invoke it, we continue with the new 
object rather than the (unmodified) original object?




-- 
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