maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r1384982 - /maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java
Date Sat, 15 Sep 2012 00:26:17 GMT
Author: bimargulies
Date: Sat Sep 15 00:26:16 2012
New Revision: 1384982

URL: http://svn.apache.org/viewvc?rev=1384982&view=rev
Log:
MJAVADOC-312: having parenthesis as part of a path causes ArrayIndexOutOfBounds exception
o added call to Pattern.quote to protect from problem.

Modified:
    maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java?rev=1384982&r1=1384981&r2=1384982&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java
(original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java
Sat Sep 15 00:26:16 2012
@@ -466,7 +466,7 @@ public class JavadocUtil
             int idx = file.lastIndexOf( File.separatorChar );
             String tmpStr = file.substring( 0, idx );
             tmpStr = tmpStr.replace( '\\', '/' );
-            String[] srcSplit = tmpStr.split( sourceDirectory.replace( '\\', '/' ) + '/'
);
+            String[] srcSplit = tmpStr.split( Pattern.quote( sourceDirectory.replace( '\\',
'/' ) + '/'  ));
             String excludedPackage = srcSplit[1].replace( '/', '.' );
 
             if ( !excluded.contains( excludedPackage ) )



Mime
View raw message