JDK-8236696 : Release Note: MethodHandles::privateLookupIn Might Not Produce a Lookup With Full Privilege Access
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Affected Version: 14
  • Priority: P4
  • Status: Closed
  • Resolution: Delivered
  • Submitted: 2020-01-06
  • Updated: 2021-05-14
  • Resolved: 2020-08-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 14
14Resolved
Description
The `Lookup` object produced by `MethodHandles::privateLookupIn` in this release might not have full privilege access. A `Lookup` that possesses both PRIVATE and MODULE access modes is said to possess full privilege access that can be tested with the `Lookup::hasFullPrivilegeAccess` method. 
In previous releases, a `Lookup` returned from `MethodHandles::privateLookupIn` could be used to look up caller-sensitive methods. In Java SE 14, if a `Lookup` does not have full privilege access (even though it has private access mode), it might fail to look up caller-sensitive methods.