QDox
  1. QDox
  2. QDOX-108

FQN Annotation parsing fails

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.6.2
    • Component/s: Parser
    • Labels:
      None
    • Number of attachments :
      1

      Description

      "@Anno" works, but "@com.comany.Anno" does not.

      Parser fix attached.

        Issue Links

          Activity

          Hide
          Paul Hammant added a comment -

          I tried to apply this patch. After attempting to recreate a failing testcase. Well modify an existing one to fail at least:

          public void testAnnotationTokens() throws Exception {
          String in = ""
          + "@Copyright (year = 2004, month = \"Jan\")\n"
          + "@Note(\"Just ignore me\")\n"
          + "@foo.Bar\n"
          + "public class LexerTest extends TestCase {}\n";
          Lexer lexer = new JFlexLexer(new StringReader(in));

          assertLex(Parser.AT, lexer);
          assertLex(Parser.IDENTIFIER, "Copyright", lexer);
          assertLex(Parser.PARENOPEN, lexer);
          assertLex(Parser.IDENTIFIER, "year", lexer);
          assertLex(Parser.COMMA, lexer);
          assertLex(Parser.IDENTIFIER, "month", lexer);
          assertLex(Parser.PARENCLOSE, lexer);
          assertLex(Parser.AT, lexer);
          assertLex(Parser.IDENTIFIER, "Note", lexer);
          assertLex(Parser.PARENOPEN, lexer);
          assertLex(Parser.PARENCLOSE, lexer);

          assertLex(Parser.AT, lexer);
          assertLex(Parser.IDENTIFIER, "foo.Bar", lexer);

          assertLex(Parser.PUBLIC, lexer);
          assertLex(Parser.CLASS, lexer);
          assertLex(Parser.IDENTIFIER, "LexerTest", lexer);
          assertLex(Parser.EXTENDS, lexer);
          assertLex(Parser.IDENTIFIER, "TestCase", lexer);
          assertLex(Parser.BRACEOPEN, lexer);
          assertLex(Parser.BRACECLOSE, lexer);
          assertLex(0, lexer);
          }

          The thing sure fails as expected, but after the application of the patch (and the regeneration of Parser.java) it does not pass.

          Thus I cannot apply. I need help to work thru this

          Show
          Paul Hammant added a comment - I tried to apply this patch. After attempting to recreate a failing testcase. Well modify an existing one to fail at least: public void testAnnotationTokens() throws Exception { String in = "" + "@Copyright (year = 2004, month = \"Jan\")\n" + "@Note(\"Just ignore me\")\n" + "@foo.Bar\n" + "public class LexerTest extends TestCase {}\n"; Lexer lexer = new JFlexLexer(new StringReader(in)); assertLex(Parser.AT, lexer); assertLex(Parser.IDENTIFIER, "Copyright", lexer); assertLex(Parser.PARENOPEN, lexer); assertLex(Parser.IDENTIFIER, "year", lexer); assertLex(Parser.COMMA, lexer); assertLex(Parser.IDENTIFIER, "month", lexer); assertLex(Parser.PARENCLOSE, lexer); assertLex(Parser.AT, lexer); assertLex(Parser.IDENTIFIER, "Note", lexer); assertLex(Parser.PARENOPEN, lexer); assertLex(Parser.PARENCLOSE, lexer); assertLex(Parser.AT, lexer); assertLex(Parser.IDENTIFIER, "foo.Bar", lexer); assertLex(Parser.PUBLIC, lexer); assertLex(Parser.CLASS, lexer); assertLex(Parser.IDENTIFIER, "LexerTest", lexer); assertLex(Parser.EXTENDS, lexer); assertLex(Parser.IDENTIFIER, "TestCase", lexer); assertLex(Parser.BRACEOPEN, lexer); assertLex(Parser.BRACECLOSE, lexer); assertLex(0, lexer); } The thing sure fails as expected, but after the application of the patch (and the regeneration of Parser.java) it does not pass. Thus I cannot apply. I need help to work thru this
          Hide
          Paul Hammant added a comment -

          After QDOX-94 the grammar has changed so that the attached patch will not apply. Additionally, the test (as above) does not pass w/o further grammar changes.

          What next ?

          Show
          Paul Hammant added a comment - After QDOX-94 the grammar has changed so that the attached patch will not apply. Additionally, the test (as above) does not pass w/o further grammar changes. What next ?
          Hide
          Eric Redmond added a comment -

          Sorry, covered by QDOX-94 ... this can be closed.

          Show
          Eric Redmond added a comment - Sorry, covered by QDOX-94 ... this can be closed.
          Hide
          Mauro Talevi added a comment -

          Changed fix version to 1.7

          Show
          Mauro Talevi added a comment - Changed fix version to 1.7
          Mauro Talevi made changes -
          Field Original Value New Value
          Fix Version/s 1.7 [ 11160 ]
          Fix Version/s 1.6 [ 10814 ]
          Eric Redmond made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Dennis Lundberg made changes -
          Link This issue duplicates QDOX-94 [ QDOX-94 ]
          Dennis Lundberg made changes -
          Fix Version/s 1.7 [ 11160 ]
          Fix Version/s 1.6.2 [ 14091 ]
          Dennis Lundberg made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Benjamin Bentmann made changes -
          Link This issue is depended upon by MDOCCK-12 [ MDOCCK-12 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Eric Redmond
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: