test/runtime/8024804/RegisterNatives.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File bug_jdk8028741 Cdiff test/runtime/8024804/RegisterNatives.java

test/runtime/8024804/RegisterNatives.java

Print this page

        

*** 20,33 **** * or visit www.oracle.com if you need additional information or have any * questions. */ /* - * @ignore 8028741 * @test * @bug 8024804 ! * @summary registerNatives() interface resolution should receive IAE * @run main RegisterNatives */ public class RegisterNatives { interface I { void registerNatives(); } interface J extends I {} --- 20,32 ---- * or visit www.oracle.com if you need additional information or have any * questions. */ /* * @test * @bug 8024804 ! * @summary interface method resolution should skip finding j.l.Object's registerNatives() and succeed in selecting class B's registerNatives() * @run main RegisterNatives */ public class RegisterNatives { interface I { void registerNatives(); } interface J extends I {}
*** 36,47 **** System.out.println("Regression test for JDK-8024804, crash when InterfaceMethodref resolves to Object.registerNatives\n"); J val = new B(); try { val.registerNatives(); } catch (IllegalAccessError e) { ! System.out.println("TEST PASSES - according to current JVM spec, IAE expected\n"); return; } ! System.out.println("TEST FAILS - no IAE resulted\n"); ! System.exit(1); } } --- 35,46 ---- System.out.println("Regression test for JDK-8024804, crash when InterfaceMethodref resolves to Object.registerNatives\n"); J val = new B(); try { val.registerNatives(); } catch (IllegalAccessError e) { ! System.out.println("TEST FAILS - JDK 8 JVMS, static and non-public methods of j.l.Object should be ignored during interface method resolution\n"); ! System.exit(1); return; } ! System.out.println("TEST PASSES - no IAE resulted\n"); } }
test/runtime/8024804/RegisterNatives.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File