ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/ConcurrentLinkedQueueTest.java
(Generate patch)

Comparing jsr166/src/test/tck/ConcurrentLinkedQueueTest.java (file contents):
Revision 1.13 by jsr166, Sat Nov 21 10:25:05 2009 UTC vs.
Revision 1.14 by jsr166, Sat Nov 21 10:29:50 2009 UTC

# Line 81 | Line 81 | public class ConcurrentLinkedQueueTest e
81       * Queue contains all elements of collection used to initialize
82       */
83      public void testConstructor6() {
84 <        try {
85 <            Integer[] ints = new Integer[SIZE];
86 <            for (int i = 0; i < SIZE; ++i)
87 <                ints[i] = new Integer(i);
88 <            ConcurrentLinkedQueue q = new ConcurrentLinkedQueue(Arrays.asList(ints));
89 <            for (int i = 0; i < SIZE; ++i)
90 <                assertEquals(ints[i], q.poll());
91 <        }
92 <        finally {}
84 >        Integer[] ints = new Integer[SIZE];
85 >        for (int i = 0; i < SIZE; ++i)
86 >            ints[i] = new Integer(i);
87 >        ConcurrentLinkedQueue q = new ConcurrentLinkedQueue(Arrays.asList(ints));
88 >        for (int i = 0; i < SIZE; ++i)
89 >            assertEquals(ints[i], q.poll());
90      }
91  
92      /**
# Line 216 | Line 213 | public class ConcurrentLinkedQueueTest e
213       * Queue contains all elements, in traversal order, of successful addAll
214       */
215      public void testAddAll5() {
216 <        try {
217 <            Integer[] empty = new Integer[0];
218 <            Integer[] ints = new Integer[SIZE];
219 <            for (int i = 0; i < SIZE; ++i)
220 <                ints[i] = new Integer(i);
221 <            ConcurrentLinkedQueue q = new ConcurrentLinkedQueue();
222 <            assertFalse(q.addAll(Arrays.asList(empty)));
223 <            assertTrue(q.addAll(Arrays.asList(ints)));
224 <            for (int i = 0; i < SIZE; ++i)
228 <                assertEquals(ints[i], q.poll());
229 <        }
230 <        finally {}
216 >        Integer[] empty = new Integer[0];
217 >        Integer[] ints = new Integer[SIZE];
218 >        for (int i = 0; i < SIZE; ++i)
219 >            ints[i] = new Integer(i);
220 >        ConcurrentLinkedQueue q = new ConcurrentLinkedQueue();
221 >        assertFalse(q.addAll(Arrays.asList(empty)));
222 >        assertTrue(q.addAll(Arrays.asList(ints)));
223 >        for (int i = 0; i < SIZE; ++i)
224 >            assertEquals(ints[i], q.poll());
225      }
226  
227      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines