JCModifiers.getModifiers() returns incorrect Modifiers set.

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 6
    • Affects Version/s: 6
    • Component/s: tools
    • b81
    • generic
    • generic
    • Verified

      JCModifiers.getModifiers() returns a Set<Modifier> which should contain a modifier which matches each bit set in JCModifiers.flags (excluding non-standard flags). The problem is that this method's implementation depends upon the order of enumerations matching the bit order as defined in com.sun.tools.javac.code.Flags. Because these two lists are different, the set of Modifiers doesn't match the flags. I verified this in the debugger, where Flags.toString() showed "static final" while the Modifier set contained "[abstract, static]".

            Assignee:
            Jonathan Gibbons
            Reporter:
            Tom Ball (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: