8228671: Fastdebug VM throws InternalError when publicLookup.in(T) is used to resolve a member

Reviewed-by: alanb
This commit is contained in:
Mandy Chung 2019-07-27 14:49:16 -07:00
parent 80ebfe9bba
commit 19ec64630a

View file

@ -1329,7 +1329,14 @@ public class MethodHandles {
// This is just for calling out to MethodHandleImpl.
private Class<?> lookupClassOrNull() {
return (allowedModes == TRUSTED) ? null : lookupClass;
if (allowedModes == TRUSTED) {
return null;
}
if (allowedModes == UNCONDITIONAL) {
// use Object as the caller to pass to VM doing resolution
return Object.class;
}
return lookupClass;
}
/** Tells which access-protection classes of members this lookup object can produce.