test/runtime/8024804/RegisterNatives.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/test/runtime/8024804/RegisterNatives.java	Mon Dec  9 19:10:12 2013
--- new/test/runtime/8024804/RegisterNatives.java	Mon Dec  9 19:10:11 2013

*** 20,33 **** --- 20,32 ---- * 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 ! * @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 **** --- 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 PASSES - according to current JVM spec, IAE expected\n"); ! 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 FAILS - no IAE resulted\n"); System.exit(1); ! 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