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

Incorrect access bits generated for nested classes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.2.0
    • 1.2.0
    • tools
    • None
    • 1.2beta4
    • generic, unknown, sparc
    • generic, solaris_2.5, solaris_2.5.1
    • Not verified

      The following was reported as a regression in 4087314. The problem
      unrelated to the failure mode reported there, however, so I am submitting
      it as a new bug.

      ----

      The fix for 4087314 appears to have regressed. The compiler
      I'm using (which claims to be "1.2beta3") is not transforming
      protected nested types to public. Here is an attempt at a
      more systematic survey of the modifier bits.

      A nested type has two sets of access bits, the transformed and the
      untransformed. The latter are stored in the InnerClasses attr.
      (repeated for every __reference__ to the class) and the former
      are a required part of the classfile format.

      A few points about their values:

       - the ACC_SUPER bit should not be set in InnerClasses (this is true)

       - the ACC_PUBLIC bit should be set in the classfile modifiers if the
         untransformed ACC_PROTECTED bit is set (this is __false__ in 1.2beta3,
         contrary to the recorded status of bug #4087314)

       - if the nested type is an interface, the ACC_INTERFACE and ACC_ABSTRACT
         are set in the transformed bitmask

       - if the nested type is an interface, the ACC_INTERFACE and ACC_STATIC
         are set in the untransformed bitmask (ACC_ABSTRACT should be set also:
         nested interfaces are automatically static, just as all interfaces
         are automatically abstract)

      ---

      Entered by william.maddox@Eng 1998-02-05, originally reported by jrose.

            wmaddoxsunw William Maddox (Inactive)
            wmaddoxsunw William Maddox (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: