mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
Merge
This commit is contained in:
commit
16548883ec
11 changed files with 319 additions and 25 deletions
|
@ -131,8 +131,14 @@ final class MethodTypeDescImpl implements MethodTypeDesc {
|
|||
}
|
||||
|
||||
@Override
|
||||
public MethodType resolveConstantDesc(MethodHandles.Lookup lookup) {
|
||||
return MethodType.fromMethodDescriptorString(descriptorString(), lookup.lookupClass().getClassLoader());
|
||||
public MethodType resolveConstantDesc(MethodHandles.Lookup lookup) throws ReflectiveOperationException {
|
||||
MethodType mtype = MethodType.fromMethodDescriptorString(descriptorString(), lookup.lookupClass().getClassLoader());
|
||||
// let's check that the lookup has access to all the types in the method type
|
||||
lookup.accessClass(mtype.returnType());
|
||||
for (Class<?> paramType: mtype.parameterArray()) {
|
||||
lookup.accessClass(paramType);
|
||||
}
|
||||
return mtype;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue