mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8282701: Use Class.getInterfaces(false) where possible to reduce allocation pressure
Reviewed-by: redestad, mchung
This commit is contained in:
parent
0f3773635d
commit
9073a98d57
1 changed files with 2 additions and 2 deletions
|
@ -3125,7 +3125,7 @@ public final class Class<T> implements java.io.Serializable,
|
|||
}
|
||||
// check package access on the proxy interfaces
|
||||
if (checkProxyInterfaces && Proxy.isProxyClass(this)) {
|
||||
ReflectUtil.checkProxyPackageAccess(ccl, this.getInterfaces());
|
||||
ReflectUtil.checkProxyPackageAccess(ccl, this.getInterfaces(/* cloneArray */ false));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3373,7 +3373,7 @@ public final class Class<T> implements java.io.Serializable,
|
|||
addAll(fields, privateGetDeclaredFields(true));
|
||||
|
||||
// Direct superinterfaces, recursively
|
||||
for (Class<?> si : getInterfaces()) {
|
||||
for (Class<?> si : getInterfaces(/* cloneArray */ false)) {
|
||||
addAll(fields, si.privateGetPublicFields());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue