JDK-8233527 : Update Lookup::hasPrivateAccess and Lookup::defineClass spec w.r.t. full power lookup
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Affected Version: 14
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-11-04
  • Updated: 2019-12-10
  • Resolved: 2019-12-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
14 b26Fixed
Related Reports
CSR :  
Relates :  
Sub Tasks
JDK-8236696 :  
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.
Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/a9347576dbc7 User: mchung Date: 2019-12-04 18:47:11 +0000
04-12-2019