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

An incomplete fix for the NPE bugs in AbstractJavadocMojo.java

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9
    • Labels:
      None

      Description

      The fix revision 554202 was aimed to remove an NPE bug on the returned value of "getJavadocDirectory()" in the method "getSourcePaths " of the file "/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java" , but it is incomplete.
      Since the returned value "getJavadocDirectory()" could be null during the runtime execution, its value should also be null-checked before being dereferenced in other methods.

      The buggy code locations the same fix needs to be applied at are as bellows:

      Line 2401 of the method "copyJavadocResources";
      Line 1505 of the method "getSourcePaths".

        Activity

        Guangtai Liang created issue -
        Hide
        Marcin Domanski added a comment -

        This is true p.i.t.a. Out of 3 projects on javadoc:fix (v2.8.1)

        • 1 failed with NPE on:
          • java.lang.NullPointerException
                    at org.apache.maven.plugin.javadoc.AbstractFixJavadocMojo.writeParamTag(AbstractFixJavadocMojo.java:1994)
        • the other failed with (seems to be fixed in Qdox already):
          • java.lang.ArrayIndexOutOfBoundsException: 500
                    at com.thoughtworks.qdox.parser.impl.Parser.val_push(Parser.java:142)
                    at com.thoughtworks.qdox.parser.impl.Parser.yyparse(Parser.java:1303)
                    at com.thoughtworks.qdox.parser.impl.Parser.parse(Parser.java:999)
                    at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:353)
                    at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:381)
                    at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:377)
                    at org.apache.maven.plugin.javadoc.AbstractFixJavadocMojo.getQdoxClasses(AbstractFixJavadocMojo.java:855)
        • last one was successful
        Show
        Marcin Domanski added a comment - This is true p.i.t.a. Out of 3 projects on javadoc:fix (v2.8.1) 1 failed with NPE on: java.lang.NullPointerException at org.apache.maven.plugin.javadoc.AbstractFixJavadocMojo.writeParamTag(AbstractFixJavadocMojo.java:1994) the other failed with (seems to be fixed in Qdox already): java.lang.ArrayIndexOutOfBoundsException: 500 at com.thoughtworks.qdox.parser.impl.Parser.val_push(Parser.java:142) at com.thoughtworks.qdox.parser.impl.Parser.yyparse(Parser.java:1303) at com.thoughtworks.qdox.parser.impl.Parser.parse(Parser.java:999) at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:353) at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:381) at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:377) at org.apache.maven.plugin.javadoc.AbstractFixJavadocMojo.getQdoxClasses(AbstractFixJavadocMojo.java:855) last one was successful
        Hide
        Benson Margulies added a comment -

        THis is more likely to get fixed with test case(s) attached.

        Show
        Benson Margulies added a comment - THis is more likely to get fixed with test case(s) attached.
        Benson Margulies made changes -
        Field Original Value New Value
        Priority Critical [ 2 ] Major [ 3 ]
        Benson Margulies made changes -
        Assignee Benson Margulies [ bmargulies ]
        Hide
        Benson Margulies added a comment -

        ------------------------------------------------------------------------
        r1385200 | bimargulies | 2012-09-15 19:22:45 -0400 (Sat, 15 Sep 2012) | 4 lines

        MJAVADOC-342: An incomplete fix for the NPE bugs in AbstractJavadocMojo.java
        o protect all the calls to getJavadocDirectory
        o update to threadsafe version of maven-shade-plugin.

        Show
        Benson Margulies added a comment - ------------------------------------------------------------------------ r1385200 | bimargulies | 2012-09-15 19:22:45 -0400 (Sat, 15 Sep 2012) | 4 lines MJAVADOC-342 : An incomplete fix for the NPE bugs in AbstractJavadocMojo.java o protect all the calls to getJavadocDirectory o update to threadsafe version of maven-shade-plugin.
        Benson Margulies made changes -
        Fix Version/s 2.9 [ 17249 ]
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Hervé Boutemy made changes -
        Comment [ ONLINE STORE :
        ==== ( http://zzb.bz/LNmmL ) =====






        n2012 comes, in order to thank everyone, characteristic, novel style, varieties, low price and good quality, and the low sale price. Thank everyone


        free shipping

        competitive price

        any size available

        accept the paypal

        jordan shoes $32

        nike shox $32

        Christan Audigier bikini $23

        Ed Hardy Bikini $23

        Smful short_t-shirt_woman $15

        ed hardy short_tank_woman $16

        Sandal $32

        christian louboutin $80

        Sunglass $15

        COACH_Necklace $27

        handbag $33

        AF tank woman $17


        puma slipper woman $30
        ==== ( http://zzb.bz/LNmmL ) ===== ]
        Hervé Boutemy made changes -
        Comment [ ONLINE STORE :
        ==== ( http://zzb.bz/LNmmL ) =====






        n2012 comes, in order to thank everyone, characteristic, novel style, varieties, low price and good quality, and the low sale price. Thank everyone


        free shipping

        competitive price

        any size available

        accept the paypal

        jordan shoes $32

        nike shox $32

        Christan Audigier bikini $23

        Ed Hardy Bikini $23

        Smful short_t-shirt_woman $15

        ed hardy short_tank_woman $16

        Sandal $32

        christian louboutin $80

        Sunglass $15

        COACH_Necklace $27

        handbag $33

        AF tank woman $17


        puma slipper woman $30
        ==== ( http://zzb.bz/LNmmL ) ===== ]
        Hervé Boutemy made changes -
        Comment [ ONLINE STORE :
        ==== ( http://zzb.bz/LNmmL ) =====






        n2012 comes, in order to thank everyone, characteristic, novel style, varieties, low price and good quality, and the low sale price. Thank everyone


        free shipping

        competitive price

        any size available

        accept the paypal

        jordan shoes $32

        nike shox $32

        Christan Audigier bikini $23

        Ed Hardy Bikini $23

        Smful short_t-shirt_woman $15

        ed hardy short_tank_woman $16

        Sandal $32

        christian louboutin $80

        Sunglass $15

        COACH_Necklace $27

        handbag $33

        AF tank woman $17


        puma slipper woman $30
        ==== ( http://zzb.bz/LNmmL ) ===== ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 11:56:47 UTC 2015 [ 1428235007093 ]
        Mark Thomas made changes -
        Workflow jira [ 12722574 ] Default workflow, editable Closed status [ 12762343 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 00:11:46 UTC 2015 [ 1428279106587 ]
        Mark Thomas made changes -
        Workflow jira [ 12960029 ] Default workflow, editable Closed status [ 12996932 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        212d 20h 29m 1 Benson Margulies 15/Sep/12 19:23

          People

          • Assignee:
            Benson Margulies
            Reporter:
            Guangtai Liang
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development