--- old/src/java.base/share/classes/jdk/internal/reflect/NativeConstructorAccessorImpl.java 2020-03-26 16:00:39.000000000 -0700 +++ new/src/java.base/share/classes/jdk/internal/reflect/NativeConstructorAccessorImpl.java 2020-03-26 16:00:38.000000000 -0700 @@ -25,9 +25,10 @@ package jdk.internal.reflect; -import java.lang.reflect.*; import sun.reflect.misc.ReflectUtil; +import java.lang.reflect.*; + /** Used only for the first few invocations of a Constructor; afterward, switches to bytecode-based implementation */ @@ -49,6 +50,7 @@ // because that kind of class can't be referred to by name, hence can't // be found from the generated bytecode. if (++numInvocations > ReflectionFactory.inflationThreshold() + && !c.getDeclaringClass().isHiddenClass() && !ReflectUtil.isVMAnonymousClass(c.getDeclaringClass())) { ConstructorAccessorImpl acc = (ConstructorAccessorImpl) new MethodAccessorGenerator().