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

Class.getModifiers returns the wrong bits : Fails with Kestrel RC2

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.2.0
    • 1.1.5, 1.2.0
    • core-libs
    • None
    • 1.2beta4
    • generic, sparc
    • solaris_2.5, solaris_2.6

      There are several problems here with the value reported by Class.getModifiers
       - the ACC_SUPER bit appears (and is observed by users as "synchronized")
       - the javadoc for this method promises that the source-level modifiers
         are returned, and it explicitly mentions private and protected: it
         should also mention static as a possibility
       - the method actually returns the "transformed" (low-level) modifiers,
         so that in fact "private", "protected", and "static" never appear,
         even if they were specified in the source code: this is wrong

            apalanissunw Anand Palaniswamy (Inactive)
            jrose John Rose
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: