< prev index next >

test/hotspot/jtreg/runtime/Nestmates/privateConstructors/TestReflection.java

Print this page

        

*** 22,32 **** */ /* * @test * @bug 8046171 ! * @summary Test access to private constructors between nestmates and nest-top * using different flavours of named nested types using core reflection * @run main TestReflection * @run main/othervm -Dsun.reflect.noInflation=true TestReflection */ --- 22,32 ---- */ /* * @test * @bug 8046171 ! * @summary Test access to private constructors between nestmates and nest-host * using different flavours of named nested types using core reflection * @run main TestReflection * @run main/othervm -Dsun.reflect.noInflation=true TestReflection */
*** 98,108 **** Object obj = o.getClass().getDeclaredConstructor(new Class<?>[0]).newInstance(new Object[0]); } } public static void main(String[] args) throws Throwable { ! // These initial constructions test nest-top access TestReflection o = TestReflection.class.getDeclaredConstructor(new Class<?>[0]).newInstance(new Object[0]); StaticNested s = StaticNested.class.getDeclaredConstructor(new Class<?>[0]).newInstance(new Object[0]); InnerNested i = InnerNested.class.getDeclaredConstructor(new Class<?>[] {TestReflection.class}).newInstance(new Object[] { o }); StaticIface intf = new StaticIface() {}; --- 98,108 ---- Object obj = o.getClass().getDeclaredConstructor(new Class<?>[0]).newInstance(new Object[0]); } } public static void main(String[] args) throws Throwable { ! // These initial constructions test nest-host access TestReflection o = TestReflection.class.getDeclaredConstructor(new Class<?>[0]).newInstance(new Object[0]); StaticNested s = StaticNested.class.getDeclaredConstructor(new Class<?>[0]).newInstance(new Object[0]); InnerNested i = InnerNested.class.getDeclaredConstructor(new Class<?>[] {TestReflection.class}).newInstance(new Object[] { o }); StaticIface intf = new StaticIface() {};
< prev index next >