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

Add a new Lookup::hasFullPrivilegeAccess method and document the capabilities requiring full privileges

Reviewed-by: alanb, plevart
This commit is contained in:
Mandy Chung 2019-12-04 10:46:49 -08:00
parent 72f42efcd9
commit a445b66e58
5 changed files with 112 additions and 68 deletions

View file

@ -276,9 +276,8 @@ public final class LambdaMetafactory {
*
* @param caller Represents a lookup context with the accessibility
* privileges of the caller. Specifically, the lookup context
* must have
* <a href="MethodHandles.Lookup.html#privacc">private access</a>
* privileges.
* must have {@linkplain MethodHandles.Lookup#hasFullPrivilegeAccess()
* full privilege access}.
* When used with {@code invokedynamic}, this is stacked
* automatically by the VM.
* @param invokedName The name of the method to implement. When used with
@ -422,9 +421,8 @@ public final class LambdaMetafactory {
*
* @param caller Represents a lookup context with the accessibility
* privileges of the caller. Specifically, the lookup context
* must have
* <a href="MethodHandles.Lookup.html#privacc">private access</a>
* privileges.
* must have {@linkplain MethodHandles.Lookup#hasFullPrivilegeAccess()
* full privilege access}.
* When used with {@code invokedynamic}, this is stacked
* automatically by the VM.
* @param invokedName The name of the method to implement. When used with