On 11/12/19 4:56 AM, Alan Bateman wrote:
On 11/11/2019 21:23, Mandy Chung wrote:
This is a follow-up of JDK-8226916. Lookup::hasPrivateAccess intends
to test if this lookup is a full-power lookup; that is created by the
original caller class calling MethodHandles::lookup. The current
specification for Lookup::hasPrivateAccess returns true if the lookup
modes contain PRIVATE but it does not check MODULE bit.
This patch also clarifies the capabilities w.r.t PRIVATE access and
full-power access. The security permission check is performed if the
Lookup is not a full power lookup and therefore Lookup::defineClass
spec should be updated to perform security permission check if the
security manager is present and this lookup refuses access,
consistent with other Lookup operations.
http://cr.openjdk.java.net/~mchung/jdk14/8233527/webrev.02/
http://cr.openjdk.java.net/~mchung/jdk14/8233527/specdiff/
CSR: https://bugs.openjdk.java.net/browse/JDK-8233726
In the Lookup class description is has "Only lookups with both full
privilege access posses the following capabilities". I assume "both"
stems from an iteration that was going to both both PRIVATE and MODULE
but I assume the word "both" should be removed now.
Yes the word "both" should be removed. Thanks for catching it.
Mandy