You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2021/10/23 20:46:21 UTC

[GitHub] [maven] garydgregory opened a new pull request #601: [MNG-7316] MavenProject.getAttachedArtifacts() regression with 3.8.1

garydgregory opened a new pull request #601:
URL: https://github.com/apache/maven/pull/601


   https://issues.apache.org/jira/browse/MNG-7316
   
   Following this checklist to help us incorporate your 
   contribution quickly and easily:
   
   To make clear that you license your contribution under 
   the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
    - [X] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
   


-- 
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-unsubscribe@maven.apache.org

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



[GitHub] [maven] gnodet commented on a change in pull request #601: [MNG-7316] MavenProject.getAttachedArtifacts() regression with 3.8.1

Posted by GitBox <gi...@apache.org>.
gnodet commented on a change in pull request #601:
URL: https://github.com/apache/maven/pull/601#discussion_r749067028



##########
File path: maven-core/src/main/java/org/apache/maven/project/MavenProject.java
##########
@@ -951,7 +951,7 @@ public void addAttachedArtifact( Artifact artifact )
         {
             attachedArtifacts = new ArrayList<>();
         }
-        return Collections.unmodifiableList( attachedArtifacts );

Review comment:
       See https://issues.apache.org/jira/browse/MNG-5868




-- 
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-unsubscribe@maven.apache.org

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



[GitHub] [maven] eolivelli commented on a change in pull request #601: [MNG-7316] MavenProject.getAttachedArtifacts() regression with 3.8.1

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #601:
URL: https://github.com/apache/maven/pull/601#discussion_r735075372



##########
File path: maven-core/src/main/java/org/apache/maven/project/MavenProject.java
##########
@@ -951,7 +951,7 @@ public void addAttachedArtifact( Artifact artifact )
         {
             attachedArtifacts = new ArrayList<>();
         }
-        return Collections.unmodifiableList( attachedArtifacts );
+        return attachedArtifacts;

Review comment:
       If we want to let this result be modified by the caller I would add a comment/javadoc




-- 
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-unsubscribe@maven.apache.org

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



[GitHub] [maven] olamy commented on a change in pull request #601: [MNG-7316] MavenProject.getAttachedArtifacts() regression with 3.8.1

Posted by GitBox <gi...@apache.org>.
olamy commented on a change in pull request #601:
URL: https://github.com/apache/maven/pull/601#discussion_r735209417



##########
File path: maven-core/src/main/java/org/apache/maven/project/MavenProject.java
##########
@@ -951,7 +951,7 @@ public void addAttachedArtifact( Artifact artifact )
         {
             attachedArtifacts = new ArrayList<>();
         }
-        return Collections.unmodifiableList( attachedArtifacts );

Review comment:
       with such change it will possible again to have duplicate artifacts.




-- 
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-unsubscribe@maven.apache.org

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



[GitHub] [maven] garydgregory commented on a change in pull request #601: [MNG-7316] MavenProject.getAttachedArtifacts() regression with 3.8.1

Posted by GitBox <gi...@apache.org>.
garydgregory commented on a change in pull request #601:
URL: https://github.com/apache/maven/pull/601#discussion_r735106745



##########
File path: maven-core/src/main/java/org/apache/maven/project/MavenProject.java
##########
@@ -951,7 +951,7 @@ public void addAttachedArtifact( Artifact artifact )
         {
             attachedArtifacts = new ArrayList<>();
         }
-        return Collections.unmodifiableList( attachedArtifacts );
+        return attachedArtifacts;

Review comment:
       Err... maybe the Javadoc should have been updated when the method was changed to change the collection from mutable to immutable, but, the method has zero Javadoc to begin with, so not a great way to lead by example ;-)




-- 
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-unsubscribe@maven.apache.org

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