mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8287908: Use non-cloning reflection methods where acceptable
Reviewed-by: rriggs
This commit is contained in:
parent
0c61bf109f
commit
9ef6c0925a
4 changed files with 9 additions and 9 deletions
|
@ -522,7 +522,7 @@ final class ProxyGenerator extends ClassWriter {
|
|||
*/
|
||||
private void addProxyMethod(Method m, Class<?> fromClass) {
|
||||
Class<?> returnType = m.getReturnType();
|
||||
Class<?>[] exceptionTypes = m.getExceptionTypes();
|
||||
Class<?>[] exceptionTypes = m.getSharedExceptionTypes();
|
||||
|
||||
String sig = m.toShortSignature();
|
||||
List<ProxyMethod> sigmethods = proxyMethods.computeIfAbsent(sig,
|
||||
|
@ -544,7 +544,7 @@ final class ProxyGenerator extends ClassWriter {
|
|||
return;
|
||||
}
|
||||
}
|
||||
sigmethods.add(new ProxyMethod(m, sig, m.getParameterTypes(), returnType,
|
||||
sigmethods.add(new ProxyMethod(m, sig, m.getSharedParameterTypes(), returnType,
|
||||
exceptionTypes, fromClass,
|
||||
"m" + proxyMethodCount++));
|
||||
}
|
||||
|
@ -717,8 +717,8 @@ final class ProxyGenerator extends ClassWriter {
|
|||
*/
|
||||
private ProxyMethod(Method method, String methodFieldName) {
|
||||
this(method, method.toShortSignature(),
|
||||
method.getParameterTypes(), method.getReturnType(),
|
||||
method.getExceptionTypes(), method.getDeclaringClass(), methodFieldName);
|
||||
method.getSharedParameterTypes(), method.getReturnType(),
|
||||
method.getSharedExceptionTypes(), method.getDeclaringClass(), methodFieldName);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue