QDox
  1. QDox
  2. QDOX-144

QDox fails to parse correct code

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.8
    • Component/s: Parser
    • Labels:
      None
    • Number of attachments :
      1

      Description

      Checked with the latest 1.7-snapshot.

      QDox fails to parse this code:

      package org.carrot2.util.attribute.constraint;

      public class Test
      {
      public enum TestValueSet

      { VALUE_1 }

      static class AnnotationContainer
      { @ValueHintEnum(values = TestValueSet.class) String hint; }
      }

      while it does not have problems when the enum is moved at the end of the class:

      package org.carrot2.util.attribute.constraint;

      public class Test
      {
      static class AnnotationContainer
      { @ValueHintEnum(values = TestValueSet.class) String hint; }

      public enum TestValueSet
      { VALUE_1 }

      }

        Activity

        Hide
        Robert Scholte added a comment -

        Found the bug and was able to fix it.
        The enumMode in the lexer ends with the next Parser.SEMI. This enum didn't contain any.
        Fix is setting the enumMode explicit for interfaces, classes, enums and anno's.

        Show
        Robert Scholte added a comment - Found the bug and was able to fix it. The enumMode in the lexer ends with the next Parser.SEMI. This enum didn't contain any. Fix is setting the enumMode explicit for interfaces, classes, enums and anno's.
        Robert Scholte made changes -
        Field Original Value New Value
        Attachment Qdox-144.patch [ 39176 ]
        Mauro Talevi made changes -
        Fix Version/s 1.8 [ 14826 ]
        Hide
        Mauro Talevi added a comment -

        Applied patch from Robert Scholte.

        Show
        Mauro Talevi added a comment - Applied patch from Robert Scholte.
        Mauro Talevi made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Closed [ 6 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Stanislaw Osinski
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: