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

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 14
    • Fix Version/s: 14
    • Component/s: core-libs
    • Labels:

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mchung Mandy Chung
                Reporter:
                mchung Mandy Chung
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: