ArrayIndexOutOfBoundsException in JavadocUtil.getIncludedFiles
--------------------------------------------------------------

                 Key: MJAVADOC-220
                 URL: http://jira.codehaus.org/browse/MJAVADOC-220
             Project: Maven 2.x Javadoc Plugin
          Issue Type: Bug
    Affects Versions: 2.5
         Environment: maven 2.0.9 windows xp
            Reporter: Luca Dall'Olio


When executing javadoc:jar with <excludePackageNames>*</excludePackageNames> 
(or other values)  we get :

java.lang.ArrayIndexOutOfBoundsException: 0
        at 
org.apache.maven.plugin.javadoc.JavadocUtil.getIncludedFiles(JavadocUtil.java:369)

This is probably related to this code :

String[] excludeName = excludePackages[k].split( "[*]" );
...
 if ( excludeName.length > 1 )
{
...
} 
else 
{
     if ( fileList[j].startsWith( sourceDirectory.toString() + 
File.separatorChar + excludeName[0] ) )
...

If the split() function returns an empty array (excludeName), we reach the 
"else" branch but "excludeName[0]" will throw 
java.lang.ArrayIndexOutOfBoundsException: 0

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to