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

@ -364,7 +364,7 @@ final class BootstrapMethodInvoker {
VM_BSCI(MethodHandle bsm, String name, T type,
Lookup lookup, int[] indexInfo) {
super(bsm, name, type, indexInfo[0]);
if (!lookup.hasPrivateAccess()) //D.I.D.
if (!lookup.hasFullPrivilegeAccess()) //D.I.D.
throw new AssertionError("bad Lookup object");
this.caller = lookup.lookupClass();
this.indexInfo = indexInfo;