You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2022/12/17 23:46:42 UTC

[maven] branch MNG-7636_maven-3.8.x created (now 64fae2b68)

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch MNG-7636_maven-3.8.x
in repository https://gitbox.apache.org/repos/asf/maven.git


      at 64fae2b68 [MNG-7636] Partially revert MNG-5868 to restore backward compatibility (see MNG-7316)

This branch includes the following new commits:

     new 64fae2b68 [MNG-7636] Partially revert MNG-5868 to restore backward compatibility (see MNG-7316)

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[maven] 01/01: [MNG-7636] Partially revert MNG-5868 to restore backward compatibility (see MNG-7316)

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch MNG-7636_maven-3.8.x
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 64fae2b68eb6dc085f7127d6a0ffb9f8e06adec2
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Dec 18 00:21:30 2022 +0100

    [MNG-7636] Partially revert MNG-5868 to restore backward compatibility (see MNG-7316)
---
 .../src/main/java/org/apache/maven/project/MavenProject.java | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/maven-core/src/main/java/org/apache/maven/project/MavenProject.java b/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
index db0f4a901..350cdddde 100644
--- a/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
+++ b/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
@@ -945,13 +945,21 @@ public class MavenProject
         }
     }
 
+    /**
+     * Returns a mutable list of the attached artifacts to this project. It is highly advised <em>not</em>
+     * to modify this list, but rather use the {@link MavenProjectHelper}.
+     * <p>
+     * <strong>Note</strong>: This list will be made read-only Maven 4.
+     *
+     * @return the attached artifacts of this project
+     */
     public List<Artifact> getAttachedArtifacts()
     {
         if ( attachedArtifacts == null )
         {
             attachedArtifacts = new ArrayList<>();
         }
-        return Collections.unmodifiableList( attachedArtifacts );
+        return attachedArtifacts;
     }
 
     public Xpp3Dom getGoalConfiguration( String pluginGroupId, String pluginArtifactId, String executionId,
@@ -1073,7 +1081,7 @@ public class MavenProject
         MavenProject that = (MavenProject) other;
 
         return Objects.equals( getArtifactId(), that.getArtifactId() )
-            && Objects.equals( getGroupId(), that.getGroupId() ) 
+            && Objects.equals( getGroupId(), that.getGroupId() )
             && Objects.equals( getVersion(), that.getVersion() );
     }