maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From denn...@apache.org
Subject svn commit: r1390145 - /maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/overlay/OverlayManager.java
Date Tue, 25 Sep 2012 21:13:36 GMT
Author: dennisl
Date: Tue Sep 25 21:13:36 2012
New Revision: 1390145

URL: http://svn.apache.org/viewvc?rev=1390145&view=rev
Log:
[MWAR-241] Overlay and an empty classifier

Modified:
    maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/overlay/OverlayManager.java

Modified: maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/overlay/OverlayManager.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/overlay/OverlayManager.java?rev=1390145&r1=1390144&r2=1390145&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/overlay/OverlayManager.java
(original)
+++ maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/overlay/OverlayManager.java
Tue Sep 25 21:13:36 2012
@@ -221,7 +221,8 @@ public class OverlayManager
     }
 
     /**
-     * compare groupId && artifactId && Type && classifier
+     * Compare groupId && artifactId && type && classifier.
+     *
      * @param overlay the overlay
      * @param artifact the artifact
      * @return boolean true if equals
@@ -231,7 +232,8 @@ public class OverlayManager
         return ( StringUtils.equals( overlay.getGroupId(), artifact.getGroupId() )
             && StringUtils.equals( overlay.getArtifactId(), artifact.getArtifactId()
)
             && StringUtils.equals( overlay.getType(), artifact.getType() )
-            && StringUtils.equals( overlay.getClassifier(), artifact.getClassifier()
) );
+            // MWAR-241 Make sure to treat null and "" as equal when comparing the classifier
+            && StringUtils.equals( StringUtils.defaultString( overlay.getClassifier()
), StringUtils.defaultString( artifact.getClassifier() ) ) );
     }
 
     /**



Mime
View raw message