--- jsr166/src/test/tck/AtomicReferenceArrayTest.java 2009/11/16 05:30:07 1.13 +++ jsr166/src/test/tck/AtomicReferenceArrayTest.java 2009/11/17 02:50:57 1.14 @@ -36,10 +36,8 @@ public class AtomicReferenceArrayTest ex try { Integer[] a = null; AtomicReferenceArray ai = new AtomicReferenceArray(a); + shouldThrow(); } catch (NullPointerException success) { - } catch (Exception ex) { - unexpectedException(); - } } /** @@ -61,18 +59,22 @@ public class AtomicReferenceArrayTest ex AtomicReferenceArray ai = new AtomicReferenceArray(SIZE); try { ai.get(SIZE); + shouldThrow(); } catch (IndexOutOfBoundsException success) { } try { ai.get(-1); + shouldThrow(); } catch (IndexOutOfBoundsException success) { } try { ai.set(SIZE, null); + shouldThrow(); } catch (IndexOutOfBoundsException success) { } try { ai.set(-1, null); + shouldThrow(); } catch (IndexOutOfBoundsException success) { } }