< prev index next >

test/compiler/c2/Test7174363.java

Print this page
rev 11557 : 8132919: use package in compiler tests
Reviewed-by: duke

*** 25,39 **** /** * @test * @bug 7174363 * @summary crash with Arrays.copyOfRange(original, from, to) when from > original.length * ! * @run main/othervm -XX:-BackgroundCompilation Test7174363 */ ! import java.util.*; public class Test7174363 { static Object[] m(Object[] original, int from, int to) { return Arrays.copyOfRange(original, from, to, Object[].class); } --- 25,41 ---- /** * @test * @bug 7174363 * @summary crash with Arrays.copyOfRange(original, from, to) when from > original.length * ! * @run main/othervm -XX:-BackgroundCompilation compiler.c2.Test7174363 */ ! package compiler.c2; + import java.util.Arrays; + public class Test7174363 { static Object[] m(Object[] original, int from, int to) { return Arrays.copyOfRange(original, from, to, Object[].class); }
*** 41,49 **** static public void main(String[] args) { Object[] orig = new Object[10]; for (int i = 0; i < 20000; i++) { try { m(orig, 15, 20); ! } catch(ArrayIndexOutOfBoundsException excp) {} } } } --- 43,52 ---- static public void main(String[] args) { Object[] orig = new Object[10]; for (int i = 0; i < 20000; i++) { try { m(orig, 15, 20); ! } catch (ArrayIndexOutOfBoundsException excp) { } } + } }
< prev index next >