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

[lworld] inner class of older classfile versions is not recognized as identity class

      Testing an object for identity in java.util.Objects.isIdentityObject(obj) checks the ACC_IDENTITY bit in Class.getModifiers() of the inner class.
      For class file versions including Valhalla, the compiler does not set the identity bit in the innerclass attribute, but earlier versions do no have the bit set.

      For top level classes, the VM adds the ACC_IDENTITY bit where appropriate when the classfile version is older.

      It would help consistency if the VM treated the modifiers in the inner class attribute the same as top level classes.

            mchung Mandy Chung (Inactive)
            rriggs Roger Riggs
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: