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

ArrayIndexOutOfBoundsException in JavadocUtil.getIncludedFiles

    Details

    • Type: Bug Bug
    • Status: 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

      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

        Luca Dall'Olio created issue -
        Siveton Vincent made changes -
        Field Original Value New Value
        Assignee Vincent Siveton [ siveton ]
        Fix Version/s 2.5.1 [ 14525 ]
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Closed [ 6 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 11:56:47 UTC 2015 [ 1428235007093 ]
        Mark Thomas made changes -
        Workflow jira [ 12722458 ] Default workflow, editable Closed status [ 12762424 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 00:11:46 UTC 2015 [ 1428279106587 ]
        Mark Thomas made changes -
        Workflow jira [ 12959952 ] Default workflow, editable Closed status [ 12996863 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development