Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6397044

JCModifiers.getModifiers() returns incorrect Modifiers set.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 6
    • 6
    • 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]".

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: