Uploaded image for project: 'Maven Javadoc Plugin'
  1. Maven Javadoc Plugin
  2. MJAVADOC-220

ArrayIndexOutOfBoundsException in JavadocUtil.getIncludedFiles

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.6
    • Component/s: None
    • Labels:
      None
    • Environment:
      maven 2.0.9 windows xp

      Description

      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

        Attachments

          Activity

            People

            • Assignee:
              siveton Siveton Vincent
              Reporter:
              luca.dallolio Luca Dall'Olio
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: