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

Update Lookup::hasPrivateAccess and Lookup::defineClass spec w.r.t. full power lookup

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 14
    • 14
    • core-libs

      Lookup::hasPrivateAccess intends to return true for "full-power lookup", i.e. a Lookup produced by the MethodHandles::lookup factory method where the caller class is the lookup class.

      With JDK-8173978, MODULE bit indicates if this lookup object is created by a member in the same module as the lookup class. MethodHandles::privateLookupIn can produce a Lookup with MODULE bit dropped if teleporting from another module.

      Lookup::hasPrivateAccess should be updated to return true if this lookup has both PRIVATE and MODULE access.

            mchung Mandy Chung (Inactive)
            mchung Mandy Chung (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: