--- jsr166/src/test/tck/LinkedBlockingQueueTest.java 2009/11/02 20:28:31 1.12 +++ jsr166/src/test/tck/LinkedBlockingQueueTest.java 2009/11/16 04:57:10 1.13 @@ -29,7 +29,7 @@ public class LinkedBlockingQueueTest ext private LinkedBlockingQueue populatedQueue(int n) { LinkedBlockingQueue q = new LinkedBlockingQueue(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()); @@ -716,7 +716,7 @@ public class LinkedBlockingQueueTest ext LinkedBlockingQueue q = populatedQueue(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(); @@ -731,7 +731,7 @@ public class LinkedBlockingQueueTest 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(); @@ -746,7 +746,7 @@ public class LinkedBlockingQueueTest ext LinkedBlockingQueue q = populatedQueue(SIZE); Object o[] = q.toArray(null); shouldThrow(); - } catch(NullPointerException success){} + } catch (NullPointerException success){} } /** @@ -757,7 +757,7 @@ public class LinkedBlockingQueueTest ext LinkedBlockingQueue q = populatedQueue(SIZE); Object o[] = q.toArray(new String[10] ); shouldThrow(); - } catch(ArrayStoreException success){} + } catch (ArrayStoreException success){} } @@ -768,7 +768,7 @@ public class LinkedBlockingQueueTest ext LinkedBlockingQueue q = populatedQueue(SIZE); Iterator it = q.iterator(); try { - while(it.hasNext()){ + while (it.hasNext()){ assertEquals(it.next(), q.take()); } } catch (InterruptedException e){ @@ -934,7 +934,7 @@ public class LinkedBlockingQueueTest ext assertEquals(q.size(), r.size()); while (!q.isEmpty()) assertEquals(q.remove(), r.remove()); - } catch(Exception e){ + } catch (Exception e){ unexpectedException(); } } @@ -947,7 +947,7 @@ public class LinkedBlockingQueueTest ext try { q.drainTo(null); shouldThrow(); - } catch(NullPointerException success) { + } catch (NullPointerException success) { } } @@ -959,7 +959,7 @@ public class LinkedBlockingQueueTest ext try { q.drainTo(q); shouldThrow(); - } catch(IllegalArgumentException success) { + } catch (IllegalArgumentException success) { } } @@ -1010,7 +1010,7 @@ public class LinkedBlockingQueueTest ext assertEquals(l.get(i), new Integer(i)); t.join(); assertTrue(q.size() + l.size() >= SIZE); - } catch(Exception e){ + } catch (Exception e){ unexpectedException(); } } @@ -1023,7 +1023,7 @@ public class LinkedBlockingQueueTest ext try { q.drainTo(null, 0); shouldThrow(); - } catch(NullPointerException success) { + } catch (NullPointerException success) { } } @@ -1035,7 +1035,7 @@ public class LinkedBlockingQueueTest ext try { q.drainTo(q, 0); shouldThrow(); - } catch(IllegalArgumentException success) { + } catch (IllegalArgumentException success) { } } @@ -1045,7 +1045,7 @@ public class LinkedBlockingQueueTest ext public void testDrainToN() { LinkedBlockingQueue q = new LinkedBlockingQueue(); 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);