Maven Javadoc Plugin
  1. Maven Javadoc Plugin
  2. MJAVADOC-220

ArrayIndexOutOfBoundsException in JavadocUtil.getIncludedFiles

    Details

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

      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

        Activity

        Hide
        Vincent Siveton added a comment -

        Fixed in r748860, snapshot deployed

        Show
        Vincent Siveton added a comment - Fixed in r748860 , snapshot deployed

          People

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

            Dates

            • Created:
              Updated:
              Resolved: