--- jsr166/src/test/tck/LinkedBlockingDequeTest.java 2009/11/02 20:28:31 1.4 +++ jsr166/src/test/tck/LinkedBlockingDequeTest.java 2009/11/16 04:57:10 1.5 @@ -25,7 +25,7 @@ public class LinkedBlockingDequeTest ext private LinkedBlockingDeque populatedDeque(int n) { LinkedBlockingDeque q = new LinkedBlockingDeque(n); assertTrue(q.isEmpty()); - for(int i = 0; i < n; i++) + for (int i = 0; i < n; i++) assertTrue(q.offer(new Integer(i))); assertFalse(q.isEmpty()); assertEquals(0, q.remainingCapacity()); @@ -1509,7 +1509,7 @@ public class LinkedBlockingDequeTest ext LinkedBlockingDeque q = populatedDeque(SIZE); Object[] o = q.toArray(); try { - for(int i = 0; i < o.length; i++) + for (int i = 0; i < o.length; i++) assertEquals(o[i], q.take()); } catch (InterruptedException e){ unexpectedException(); @@ -1524,7 +1524,7 @@ public class LinkedBlockingDequeTest ext Integer[] ints = new Integer[SIZE]; ints = (Integer[])q.toArray(ints); try { - for(int i = 0; i < ints.length; i++) + for (int i = 0; i < ints.length; i++) assertEquals(ints[i], q.take()); } catch (InterruptedException e){ unexpectedException(); @@ -1539,7 +1539,7 @@ public class LinkedBlockingDequeTest ext LinkedBlockingDeque q = populatedDeque(SIZE); Object o[] = q.toArray(null); shouldThrow(); - } catch(NullPointerException success){} + } catch (NullPointerException success){} } /** @@ -1550,7 +1550,7 @@ public class LinkedBlockingDequeTest ext LinkedBlockingDeque q = populatedDeque(SIZE); Object o[] = q.toArray(new String[10] ); shouldThrow(); - } catch(ArrayStoreException success){} + } catch (ArrayStoreException success){} } @@ -1561,7 +1561,7 @@ public class LinkedBlockingDequeTest ext LinkedBlockingDeque q = populatedDeque(SIZE); Iterator it = q.iterator(); try { - while(it.hasNext()){ + while (it.hasNext()){ assertEquals(it.next(), q.take()); } } catch (InterruptedException e){ @@ -1634,7 +1634,7 @@ public class LinkedBlockingDequeTest ext LinkedBlockingDeque q = populatedDeque(SIZE); int i = 0; Iterator it = q.descendingIterator(); - while(it.hasNext()) { + while (it.hasNext()) { assertTrue(q.contains(it.next())); ++i; } @@ -1642,7 +1642,7 @@ public class LinkedBlockingDequeTest ext assertFalse(it.hasNext()); try { it.next(); - } catch(NoSuchElementException success) { + } catch (NoSuchElementException success) { } } @@ -1791,7 +1791,7 @@ public class LinkedBlockingDequeTest ext assertEquals(q.size(), r.size()); while (!q.isEmpty()) assertEquals(q.remove(), r.remove()); - } catch(Exception e){ + } catch (Exception e){ unexpectedException(); } } @@ -1804,7 +1804,7 @@ public class LinkedBlockingDequeTest ext try { q.drainTo(null); shouldThrow(); - } catch(NullPointerException success) { + } catch (NullPointerException success) { } } @@ -1816,7 +1816,7 @@ public class LinkedBlockingDequeTest ext try { q.drainTo(q); shouldThrow(); - } catch(IllegalArgumentException success) { + } catch (IllegalArgumentException success) { } } @@ -1867,7 +1867,7 @@ public class LinkedBlockingDequeTest ext assertEquals(l.get(i), new Integer(i)); t.join(); assertTrue(q.size() + l.size() >= SIZE); - } catch(Exception e){ + } catch (Exception e){ unexpectedException(); } } @@ -1880,7 +1880,7 @@ public class LinkedBlockingDequeTest ext try { q.drainTo(null, 0); shouldThrow(); - } catch(NullPointerException success) { + } catch (NullPointerException success) { } } @@ -1892,7 +1892,7 @@ public class LinkedBlockingDequeTest ext try { q.drainTo(q, 0); shouldThrow(); - } catch(IllegalArgumentException success) { + } catch (IllegalArgumentException success) { } } @@ -1902,7 +1902,7 @@ public class LinkedBlockingDequeTest ext public void testDrainToN() { LinkedBlockingDeque q = new LinkedBlockingDeque(); for (int i = 0; i < SIZE + 2; ++i) { - for(int j = 0; j < SIZE; j++) + for (int j = 0; j < SIZE; j++) assertTrue(q.offer(new Integer(j))); ArrayList l = new ArrayList(); q.drainTo(l, i);