QDox
  1. QDox
  2. QDOX-107

Potential regression of the parser with anonymous classes (qdox 1.6.1)

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.6.1
    • Fix Version/s: 1.6.2
    • Component/s: Parser
    • Labels:
      None
    • Number of attachments :
      0

      Description

      The problem looks like the parser doesn't like dealing with multiple anonymous classes from the same interface.

      The release 2.2 of the maven-plugin-plugin transitively depends on qdox 1.6.1 which isn't capable anymore of parsing a class that qdox 1.5 used to be able to parse.

      Look at the Mojo webstart-maven-plugin. In JnlpMojo I have 2 inner classes implementing the java.io.FileFilter class.

      private FileFilter modifiedFileFilter = new FileFilter()
      {
      };

      private FileFilter jarFileFilter = new FileFilter()
      {
      }

      The parser fails in the second:

      com.thoughtworks.qdox.parser.ParseException: syntax error @[336,55] in file:/home/jerome/Projects/OSS/m2/mojo-https/trunk/mojo/webstart-maven-plugin/plugin/src/main/java/org/codehaus/mojo/webstart/JnlpMojo.java
      at com.thoughtworks.qdox.parser.impl.Parser.yyerror(Parser.java:638)
      at com.thoughtworks.qdox.parser.impl.Parser.yyparse(Parser.java:747)
      at com.thoughtworks.qdox.parser.impl.Parser.parse(Parser.java:619)
      at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:300)
      at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:316)
      at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:312)
      at com.thoughtworks.qdox.JavaDocBuilder$1.visitFile(JavaDocBuilder.java:369)
      at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:43)
      at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:34)
      at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:34)

      If I remplace the first anonymous class with an inner class, the problem disappears.

      PS: please release qdox 1.6 and 1.6.1 in Jira so that this issue can be edited to the appropriate "affects Version/s" ids.

        Issue Links

          Activity

          Jerome Lacoste made changes -
          Field Original Value New Value
          Link This issue is depended upon by MPLUGIN-26 [ MPLUGIN-26 ]
          Dennis Lundberg made changes -
          Affects Version/s 1.6.1 [ 14090 ]
          Vincent Siveton made changes -
          Link This issue is depended upon by MDOCCK-12 [ MDOCCK-12 ]
          Hide
          Dennis Lundberg added a comment -

          I tried the JnlpMojo file with qdox 1.6.1 and it fails. Switching to 1.6.2, it successfully parses the file.

          Show
          Dennis Lundberg added a comment - I tried the JnlpMojo file with qdox 1.6.1 and it fails. Switching to 1.6.2, it successfully parses the file.
          Dennis Lundberg made changes -
          Resolution Fixed [ 1 ]
          Fix Version/s 1.6.2 [ 14091 ]
          Status Open [ 1 ] Closed [ 6 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Jerome Lacoste
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: