maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdca...@apache.org
Subject svn commit: r468508 - /maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/AssemblyIncludesArtifactFilter.java
Date Fri, 27 Oct 2006 19:25:03 GMT
Author: jdcasey
Date: Fri Oct 27 12:25:02 2006
New Revision: 468508

URL: http://svn.apache.org/viewvc?view=rev&rev=468508
Log:
Adding some defensive code so wildcard matching for includes/excludes.

Modified:
    maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/AssemblyIncludesArtifactFilter.java

Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/AssemblyIncludesArtifactFilter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/AssemblyIncludesArtifactFilter.java?view=diff&rev=468508&r1=468507&r2=468508
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/AssemblyIncludesArtifactFilter.java
(original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/AssemblyIncludesArtifactFilter.java
Fri Oct 27 12:25:02 2006
@@ -169,6 +169,13 @@
                 {
                     String subPattern = subPatterns[j];
                     
+                    if ( subPattern == null || subPattern.length() < 1 )
+                    {
+                        idxes[j] = j == 0 ? 0 : idxes[j-1];
+                        
+                        continue;
+                    }
+                    
                     int lastIdx = j == 0 ? 0 : idxes[j-1];
                     
                     idxes[j] = value.indexOf( subPattern, lastIdx );



Mime
View raw message