8288730: Add type parameter to Lookup::accessClass and Lookup::ensureInitialized

Reviewed-by: mchung
This commit is contained in:
Chen Liang 2023-03-22 16:19:34 +00:00 committed by Mandy Chung
parent 37774556da
commit a2d8f634de
2 changed files with 6 additions and 5 deletions

View file

@ -422,8 +422,7 @@ public final class ConstantBootstraps {
private static <T> Class<T> validateClassAccess(MethodHandles.Lookup lookup, Class<T> type) {
try {
lookup.accessClass(type);
return type;
return lookup.accessClass(type);
}
catch (ReflectiveOperationException ex) {
throw mapLookupExceptionToError(ex);