John suggests to deprecate Lookup::hasPrivateAccess and introduce
a correctly named method `hasFullPrivilegeAccess`. Also clarify
`Lookup::findClass` javadoc that it's equivalent to `ldc` instruction.
Here is the updated webrev and specdiff:
http://cr.openjdk.java.net/~mchung/jdk14/8233527/webrev.03/
http://cr.openjdk.java.net/~mchung/jdk14/8233527/specdiff/
CSR has been updated as well.
Thanks
Mandy
On 11/11/19 1:23 PM, 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
thanks
Mandy