< prev index next >

src/java.base/share/classes/jdk/internal/reflect/ReflectionFactory.java

Print this page

        

@@ -200,11 +200,11 @@
         Method root = langReflectAccess().getRoot(method);
         if (root != null) {
             method = root;
         }
 
-        if (noInflation && !ReflectUtil.isVMAnonymousClass(method.getDeclaringClass())) {
+        if (noInflation && !method.getDeclaringClass().isHidden()) {
             return new MethodAccessorGenerator().
                 generateMethod(method.getDeclaringClass(),
                                method.getName(),
                                method.getParameterTypes(),
                                method.getReturnType(),

@@ -244,11 +244,11 @@
         if (Reflection.isSubclassOf(declaringClass,
                                     ConstructorAccessorImpl.class)) {
             return new BootstrapConstructorAccessorImpl(c);
         }
 
-        if (noInflation && !ReflectUtil.isVMAnonymousClass(c.getDeclaringClass())) {
+        if (noInflation && !c.getDeclaringClass().isHidden()) {
             return new MethodAccessorGenerator().
                 generateConstructor(c.getDeclaringClass(),
                                     c.getParameterTypes(),
                                     c.getExceptionTypes(),
                                     c.getModifiers());
< prev index next >