[
https://issues.apache.org/jira/browse/MJAVADOC-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17957641#comment-17957641
]
Olivier Lamy commented on MJAVADOC-220:
---------------------------------------
This project has moved from Jira to GitHub Issues. This issue was migrated to
[apache/maven-javadoc-plugin#922|https://github.com/apache/maven-javadoc-plugin/issues/922].
> ArrayIndexOutOfBoundsException in JavadocUtil.getIncludedFiles
> --------------------------------------------------------------
>
> Key: MJAVADOC-220
> URL: https://issues.apache.org/jira/browse/MJAVADOC-220
> Project: Maven Javadoc Plugin (Moved to GitHub Issues)
> Issue Type: Bug
> Affects Versions: 2.5
> Environment: maven 2.0.9 windows xp
> Reporter: Luca Dall'Olio
> Assignee: Siveton Vincent
> Priority: Major
> Fix For: 2.6
>
>
> 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 was sent by Atlassian Jira
(v8.20.10#820010)