You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2020/06/02 06:30:10 UTC

[maven] 04/04: argh my bad wrong on index test

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

olamy pushed a commit to branch no_duplicate_artifacts_in_attached_artifacts
in repository https://gitbox.apache.org/repos/asf/maven.git

commit c75891cff8d76825efc23a38691222442799c53d
Author: olivier lamy <ol...@apache.org>
AuthorDate: Tue Jun 2 16:29:37 2020 +1000

    argh my bad wrong on index test
    
    Signed-off-by: olivier lamy <ol...@apache.org>
---
 maven-core/src/main/java/org/apache/maven/project/MavenProject.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 31a7ff3..ec5efff 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
@@ -934,7 +934,7 @@ public class MavenProject
     {
         // if already there we remove it and add again
         int index = attachedArtifacts.indexOf( artifact );
-        if ( index > 0 )
+        if ( index >= 0 )
         {
             LOGGER.warn( "artifact {} already attached, replace previous instance", artifact );
             attachedArtifacts.set( index, artifact );