commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1429905 [18/26] - in /commons/proper/collections/trunk/src: main/java/org/apache/commons/collections/ main/java/org/apache/commons/collections/bag/ main/java/org/apache/commons/collections/bidimap/ main/java/org/apache/commons/collections/...
Date Mon, 07 Jan 2013 17:15:24 GMT
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/DualTreeBidiMap2Test.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/DualTreeBidiMap2Test.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/DualTreeBidiMap2Test.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/DualTreeBidiMap2Test.java Mon Jan  7 17:15:14 2013
@@ -45,7 +45,7 @@ public class DualTreeBidiMap2Test<K exte
         return BulkTest.makeSuite(DualTreeBidiMap2Test.class);
     }
 
-    public DualTreeBidiMap2Test(String testName) {
+    public DualTreeBidiMap2Test(final String testName) {
         super(testName);
     }
 
@@ -63,13 +63,13 @@ public class DualTreeBidiMap2Test<K exte
 
     public void testComparator() {
         resetEmpty();
-        SortedBidiMap<K, V> bidi = (SortedBidiMap<K, V>) map;
+        final SortedBidiMap<K, V> bidi = (SortedBidiMap<K, V>) map;
         assertNotNull(bidi.comparator());
         assertTrue(bidi.comparator() instanceof ReverseComparator);
     }
 
     public void testComparator2() {
-        DualTreeBidiMap<String, Integer> dtbm = new DualTreeBidiMap<String, Integer>(
+        final DualTreeBidiMap<String, Integer> dtbm = new DualTreeBidiMap<String, Integer>(
                 String.CASE_INSENSITIVE_ORDER, null);
         dtbm.put("two", 0);
         dtbm.put("one", 1);
@@ -79,18 +79,18 @@ public class DualTreeBidiMap2Test<K exte
     }
 
     public void testSerializeDeserializeCheckComparator() throws Exception {
-        SortedBidiMap<?, ?> obj = makeObject();
+        final SortedBidiMap<?, ?> obj = makeObject();
         if (obj instanceof Serializable && isTestSerialization()) {
-            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
-            ObjectOutputStream out = new ObjectOutputStream(buffer);
+            final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
+            final ObjectOutputStream out = new ObjectOutputStream(buffer);
             out.writeObject(obj);
             out.close();
 
-            ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(buffer.toByteArray()));
-            Object dest = in.readObject();
+            final ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(buffer.toByteArray()));
+            final Object dest = in.readObject();
             in.close();
 
-            SortedBidiMap<?,?> bidi = (SortedBidiMap<?,?>) dest;
+            final SortedBidiMap<?,?> bidi = (SortedBidiMap<?,?>) dest;
             assertNotNull(obj.comparator());
             assertNotNull(bidi.comparator());
             assertTrue(bidi.comparator() instanceof ReverseComparator);
@@ -99,21 +99,22 @@ public class DualTreeBidiMap2Test<K exte
 
     private static class IntegerComparator implements Comparator<Integer>, java.io.Serializable{
         private static final long serialVersionUID = 1L;
-        public int compare(Integer o1, Integer o2) {
+        public int compare(final Integer o1, final Integer o2) {
             return o1.compareTo(o2);
         }
     }
 
     public void testCollections364() throws Exception {
-        DualTreeBidiMap<String, Integer> original = new DualTreeBidiMap<String, Integer>(
+        final DualTreeBidiMap<String, Integer> original = new DualTreeBidiMap<String, Integer>(
                 String.CASE_INSENSITIVE_ORDER, new IntegerComparator());
-        ByteArrayOutputStream buffer = new ByteArrayOutputStream();
-        ObjectOutputStream out = new ObjectOutputStream(buffer);
+        final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
+        final ObjectOutputStream out = new ObjectOutputStream(buffer);
         out.writeObject(original);
         out.close();
 
-        ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(buffer.toByteArray()));
+        final ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(buffer.toByteArray()));
         @SuppressWarnings("unchecked")
+        final
         DualTreeBidiMap<String, Integer> deserialised = (DualTreeBidiMap<String, Integer>) in.readObject();
         in.close();
 
@@ -124,18 +125,18 @@ public class DualTreeBidiMap2Test<K exte
     }
 
     public void testSortOrder() throws Exception {
-        SortedBidiMap<K, V> sm = makeFullMap();
+        final SortedBidiMap<K, V> sm = makeFullMap();
 
         // Sort by the comparator used in the makeEmptyBidiMap() method
         List<K> newSortedKeys = getAsList(getSampleKeys());
         Collections.sort(newSortedKeys, new ReverseComparator<K>(ComparableComparator.<K>comparableComparator()));
         newSortedKeys = Collections.unmodifiableList(newSortedKeys);
 
-        Iterator<K> mapIter = sm.keySet().iterator();
-        Iterator<K> expectedIter = newSortedKeys.iterator();
+        final Iterator<K> mapIter = sm.keySet().iterator();
+        final Iterator<K> expectedIter = newSortedKeys.iterator();
         while (expectedIter.hasNext()) {
-            K expectedKey = expectedIter.next();
-            K mapKey = mapIter.next();
+            final K expectedKey = expectedIter.next();
+            final K mapKey = mapIter.next();
             assertNotNull("key in sorted list may not be null", expectedKey);
             assertNotNull("key in map may not be null", mapKey);
             assertEquals("key from sorted list and map must be equal", expectedKey, mapKey);

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/DualTreeBidiMapTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/DualTreeBidiMapTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/DualTreeBidiMapTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/DualTreeBidiMapTest.java Mon Jan  7 17:15:14 2013
@@ -30,7 +30,7 @@ public class DualTreeBidiMapTest<K exten
         return BulkTest.makeSuite(DualTreeBidiMapTest.class);
     }
 
-    public DualTreeBidiMapTest(String testName) {
+    public DualTreeBidiMapTest(final String testName) {
         super(testName);
     }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/TreeBidiMapTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/TreeBidiMapTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/TreeBidiMapTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/TreeBidiMapTest.java Mon Jan  7 17:15:14 2013
@@ -33,7 +33,7 @@ public class TreeBidiMapTest<K extends C
         return BulkTest.makeSuite(TreeBidiMapTest.class);
     }
 
-    public TreeBidiMapTest(String testName) {
+    public TreeBidiMapTest(final String testName) {
         super(testName);
     }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/UnmodifiableBidiMapTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/UnmodifiableBidiMapTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/UnmodifiableBidiMapTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/UnmodifiableBidiMapTest.java Mon Jan  7 17:15:14 2013
@@ -34,7 +34,7 @@ public class UnmodifiableBidiMapTest<K, 
         return BulkTest.makeSuite(UnmodifiableBidiMapTest.class);
     }
 
-    public UnmodifiableBidiMapTest(String testName) {
+    public UnmodifiableBidiMapTest(final String testName) {
         super(testName);
     }
 
@@ -45,7 +45,7 @@ public class UnmodifiableBidiMapTest<K, 
 
     @Override
     public BidiMap<K, V> makeFullMap() {
-        BidiMap<K, V> bidi = new DualHashBidiMap<K, V>();
+        final BidiMap<K, V> bidi = new DualHashBidiMap<K, V>();
         addSampleMappings(bidi);
         return UnmodifiableBidiMap.unmodifiableBidiMap(bidi);
     }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/UnmodifiableOrderedBidiMapTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/UnmodifiableOrderedBidiMapTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/UnmodifiableOrderedBidiMapTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/UnmodifiableOrderedBidiMapTest.java Mon Jan  7 17:15:14 2013
@@ -35,7 +35,7 @@ public class UnmodifiableOrderedBidiMapT
         return BulkTest.makeSuite(UnmodifiableOrderedBidiMapTest.class);
     }
 
-    public UnmodifiableOrderedBidiMapTest(String testName) {
+    public UnmodifiableOrderedBidiMapTest(final String testName) {
         super(testName);
     }
 
@@ -46,7 +46,7 @@ public class UnmodifiableOrderedBidiMapT
 
     @Override
     public BidiMap<K, V> makeFullMap() {
-        OrderedBidiMap<K, V> bidi = new TreeBidiMap<K, V>();
+        final OrderedBidiMap<K, V> bidi = new TreeBidiMap<K, V>();
         addSampleMappings(bidi);
         return UnmodifiableOrderedBidiMap.unmodifiableOrderedBidiMap(bidi);
     }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/UnmodifiableSortedBidiMapTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/UnmodifiableSortedBidiMapTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/UnmodifiableSortedBidiMapTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/UnmodifiableSortedBidiMapTest.java Mon Jan  7 17:15:14 2013
@@ -34,7 +34,7 @@ public class UnmodifiableSortedBidiMapTe
         return BulkTest.makeSuite(UnmodifiableSortedBidiMapTest.class);
     }
 
-    public UnmodifiableSortedBidiMapTest(String testName) {
+    public UnmodifiableSortedBidiMapTest(final String testName) {
         super(testName);
     }
 
@@ -46,7 +46,7 @@ public class UnmodifiableSortedBidiMapTe
 
     @Override
     public SortedBidiMap<K, V> makeFullMap() {
-        SortedBidiMap<K, V> bidi = new DualTreeBidiMap<K, V>();
+        final SortedBidiMap<K, V> bidi = new DualTreeBidiMap<K, V>();
         addSampleMappings(bidi);
         return UnmodifiableSortedBidiMap.unmodifiableSortedBidiMap(bidi);
     }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/BlockingBufferTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/BlockingBufferTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/BlockingBufferTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/BlockingBufferTest.java Mon Jan  7 17:15:14 2013
@@ -35,7 +35,7 @@ import java.util.Set;
  */
 public class BlockingBufferTest<E> extends AbstractObjectTest {
 
-    public BlockingBufferTest(String testName) {
+    public BlockingBufferTest(final String testName) {
         super(testName);
     }
 
@@ -61,8 +61,8 @@ public class BlockingBufferTest<E> exten
      * {@link BlockingBuffer#add(Object)}.
      */
     public void testGetWithAdd() {
-        Buffer<E> blockingBuffer = makeObject();
-        E obj = makeElement();
+        final Buffer<E> blockingBuffer = makeObject();
+        final E obj = makeElement();
         new DelayedAdd<E>(blockingBuffer, obj).start();
 
         // verify does not throw BufferUnderflowException; should block until other thread has added to the buffer .
@@ -70,8 +70,8 @@ public class BlockingBufferTest<E> exten
     }
 
     public void testGetWithAddTimeout() {
-        Buffer<E> blockingBuffer = BlockingBuffer.blockingBuffer(new MyBuffer<E>(), 500);
-        E obj = makeElement();
+        final Buffer<E> blockingBuffer = BlockingBuffer.blockingBuffer(new MyBuffer<E>(), 500);
+        final E obj = makeElement();
         new DelayedAdd<E>(blockingBuffer, obj, 100).start();
 
         // verify does not throw BufferUnderflowException; should block until other thread has added to the buffer .
@@ -85,8 +85,8 @@ public class BlockingBufferTest<E> exten
      * {@link BlockingBuffer#addAll(java.util.Collection)}.
      */
     public void testGetWithAddAll() {
-        Buffer<E> blockingBuffer = makeObject();
-        E obj = makeElement();
+        final Buffer<E> blockingBuffer = makeObject();
+        final E obj = makeElement();
         new DelayedAddAll<E>(blockingBuffer, obj).start();
 
         // verify does not throw BufferUnderflowException; should block until other thread has added to the buffer .
@@ -94,8 +94,8 @@ public class BlockingBufferTest<E> exten
     }
 
     public void testGetWithAddAllTimeout() {
-        Buffer<E> blockingBuffer = BlockingBuffer.blockingBuffer(new MyBuffer<E>(), 500);
-        E obj = makeElement();
+        final Buffer<E> blockingBuffer = BlockingBuffer.blockingBuffer(new MyBuffer<E>(), 500);
+        final E obj = makeElement();
         new DelayedAddAll<E>(blockingBuffer, obj, 100).start();
 
         // verify does not throw BufferUnderflowException; should block until other thread has added to the buffer .
@@ -109,8 +109,8 @@ public class BlockingBufferTest<E> exten
      * {@link BlockingBuffer#add(Object)}.
      */
     public void testRemoveWithAdd() {
-        Buffer<E> blockingBuffer = makeObject();
-        E obj = makeElement();
+        final Buffer<E> blockingBuffer = makeObject();
+        final E obj = makeElement();
         new DelayedAdd<E>(blockingBuffer, obj).start();
 
         // verify does not throw BufferUnderflowException; should block until other thread has added to the buffer .
@@ -118,12 +118,12 @@ public class BlockingBufferTest<E> exten
     }
 
     public void testRemoveWithAddTimeout() {
-        Buffer<E> blockingBuffer = BlockingBuffer.blockingBuffer(new MyBuffer<E>(), 100);
-        E obj = makeElement();
+        final Buffer<E> blockingBuffer = BlockingBuffer.blockingBuffer(new MyBuffer<E>(), 100);
+        final E obj = makeElement();
         new DelayedAdd<E>(blockingBuffer, obj, 500).start();
         try {
             blockingBuffer.remove();
-        } catch (BufferUnderflowException e) {
+        } catch (final BufferUnderflowException e) {
         }
     }
 
@@ -134,8 +134,8 @@ public class BlockingBufferTest<E> exten
      * {@link BlockingBuffer#addAll(java.util.Collection)}.
      */
     public void testRemoveWithAddAll() {
-        Buffer<E> blockingBuffer = makeObject();
-        E obj = makeElement();
+        final Buffer<E> blockingBuffer = makeObject();
+        final E obj = makeElement();
         new DelayedAddAll<E>(blockingBuffer, obj).start();
 
         // verify does not throw BufferUnderflowException; should block until other thread has added to the buffer .
@@ -143,12 +143,12 @@ public class BlockingBufferTest<E> exten
     }
 
     public void testRemoveWithAddAllTimeout() {
-        Buffer<E> blockingBuffer = BlockingBuffer.blockingBuffer(new MyBuffer<E>(), 100);
-        E obj = makeElement();
+        final Buffer<E> blockingBuffer = BlockingBuffer.blockingBuffer(new MyBuffer<E>(), 100);
+        final E obj = makeElement();
         new DelayedAddAll<E>(blockingBuffer, obj, 500).start();
         try {
             blockingBuffer.remove();
-        } catch (BufferUnderflowException e) {
+        } catch (final BufferUnderflowException e) {
         }
     }
 
@@ -161,12 +161,12 @@ public class BlockingBufferTest<E> exten
      * then both threads should complete.
      */
     public void testBlockedGetWithAdd() {
-        Buffer<E> blockingBuffer = makeObject();
-        E obj = makeElement();
+        final Buffer<E> blockingBuffer = makeObject();
+        final E obj = makeElement();
 
         // run methods will get and compare -- must wait for add
-        Thread thread1 = new ReadThread<E>(blockingBuffer, obj);
-        Thread thread2 = new ReadThread<E>(blockingBuffer, obj);
+        final Thread thread1 = new ReadThread<E>(blockingBuffer, obj);
+        final Thread thread2 = new ReadThread<E>(blockingBuffer, obj);
         thread1.start();
         thread2.start();
 
@@ -194,12 +194,12 @@ public class BlockingBufferTest<E> exten
      * singleton is added then both threads should complete.
      */
     public void testBlockedGetWithAddAll() {
-        Buffer<E> blockingBuffer = makeObject();
-        E obj = makeElement();
+        final Buffer<E> blockingBuffer = makeObject();
+        final E obj = makeElement();
 
         // run methods will get and compare -- must wait for addAll
-        Thread thread1 = new ReadThread<E>(blockingBuffer, obj);
-        Thread thread2 = new ReadThread<E>(blockingBuffer, obj);
+        final Thread thread1 = new ReadThread<E>(blockingBuffer, obj);
+        final Thread thread2 = new ReadThread<E>(blockingBuffer, obj);
         thread1.start();
         thread2.start();
 
@@ -224,12 +224,12 @@ public class BlockingBufferTest<E> exten
      * Tests interrupted {@link BlockingBuffer#get()}.
      */
     public void testInterruptedGet() {
-        Buffer<E> blockingBuffer = makeObject();
-        E obj = makeElement();
+        final Buffer<E> blockingBuffer = makeObject();
+        final E obj = makeElement();
 
         // spawn a read thread to wait on the empty buffer
-        ArrayList<String> exceptionList = new ArrayList<String>();
-        Thread thread = new ReadThread<E>(blockingBuffer, obj, exceptionList);
+        final ArrayList<String> exceptionList = new ArrayList<String>();
+        final Thread thread = new ReadThread<E>(blockingBuffer, obj, exceptionList);
         thread.start();
 
         // Interrupting the thread should cause it to throw BufferUnderflowException
@@ -255,12 +255,12 @@ public class BlockingBufferTest<E> exten
      * after the addition of a second object.
      */
     public void testBlockedRemoveWithAdd() {
-        Buffer<E> blockingBuffer = makeObject();
-        E obj = makeElement();
+        final Buffer<E> blockingBuffer = makeObject();
+        final E obj = makeElement();
 
         // run methods will remove and compare -- must wait for add
-        Thread thread1 = new ReadThread<E>(blockingBuffer, obj, null, "remove");
-        Thread thread2 = new ReadThread<E>(blockingBuffer, obj, null, "remove");
+        final Thread thread1 = new ReadThread<E>(blockingBuffer, obj, null, "remove");
+        final Thread thread2 = new ReadThread<E>(blockingBuffer, obj, null, "remove");
         thread1.start();
         thread2.start();
 
@@ -295,12 +295,12 @@ public class BlockingBufferTest<E> exten
      * singleton.
      */
     public void testBlockedRemoveWithAddAll1() {
-        Buffer<E> blockingBuffer = makeObject();
-        E obj = makeElement();
+        final Buffer<E> blockingBuffer = makeObject();
+        final E obj = makeElement();
 
         // run methods will remove and compare -- must wait for addAll
-        Thread thread1 = new ReadThread<E>(blockingBuffer, obj, null, "remove");
-        Thread thread2 = new ReadThread<E>(blockingBuffer, obj, null, "remove");
+        final Thread thread1 = new ReadThread<E>(blockingBuffer, obj, null, "remove");
+        final Thread thread2 = new ReadThread<E>(blockingBuffer, obj, null, "remove");
         thread1.start();
         thread2.start();
 
@@ -334,16 +334,16 @@ public class BlockingBufferTest<E> exten
      * complete. Each thread should have read a different object.
      */
     public void testBlockedRemoveWithAddAll2() {
-        Buffer<E> blockingBuffer = makeObject();
-        E obj1 = makeElement();
-        E obj2 = makeElement();
-        Set<E> objs = Collections.synchronizedSet(new HashSet<E>());
+        final Buffer<E> blockingBuffer = makeObject();
+        final E obj1 = makeElement();
+        final E obj2 = makeElement();
+        final Set<E> objs = Collections.synchronizedSet(new HashSet<E>());
         objs.add(obj1);
         objs.add(obj2);
 
         // run methods will remove and compare -- must wait for addAll
-        Thread thread1 = new ReadThread<E>(blockingBuffer, objs, "remove");
-        Thread thread2 = new ReadThread<E>(blockingBuffer, objs, "remove");
+        final Thread thread1 = new ReadThread<E>(blockingBuffer, objs, "remove");
+        final Thread thread2 = new ReadThread<E>(blockingBuffer, objs, "remove");
         thread1.start();
         thread2.start();
 
@@ -367,12 +367,12 @@ public class BlockingBufferTest<E> exten
      * Tests interrupted remove.
      */
     public void testInterruptedRemove() {
-        Buffer<E> blockingBuffer = makeObject();
-        E obj = makeElement();
+        final Buffer<E> blockingBuffer = makeObject();
+        final E obj = makeElement();
 
         // spawn a read thread to wait on the empty buffer
-        ArrayList<String> exceptionList = new ArrayList<String>();
-        Thread thread = new ReadThread<E>(blockingBuffer, obj, exceptionList, "remove");
+        final ArrayList<String> exceptionList = new ArrayList<String>();
+        final Thread thread = new ReadThread<E>(blockingBuffer, obj, exceptionList, "remove");
         thread.start();
 
         // Interrupting the thread should cause it to throw BufferUnderflowException
@@ -393,7 +393,7 @@ public class BlockingBufferTest<E> exten
         try {
             buffer.get(100);
             fail("Get should have timed out.");
-        } catch (BufferUnderflowException e) {
+        } catch (final BufferUnderflowException e) {
         }
     }
 
@@ -402,7 +402,7 @@ public class BlockingBufferTest<E> exten
         try {
             buffer.remove(100);
             fail("Get should have timed out.");
-        } catch (BufferUnderflowException e) {
+        } catch (final BufferUnderflowException e) {
         }
     }
 
@@ -414,13 +414,13 @@ public class BlockingBufferTest<E> exten
 
         long delay = 1000;
 
-        public DelayedAdd(Buffer<E> buffer, E obj, long delay) {
+        public DelayedAdd(final Buffer<E> buffer, final E obj, final long delay) {
             this.buffer = buffer;
             this.obj = obj;
             this.delay = delay;
         }
 
-        DelayedAdd(Buffer<E> buffer, E obj) {
+        DelayedAdd(final Buffer<E> buffer, final E obj) {
             super();
             this.buffer = buffer;
             this.obj = obj;
@@ -431,7 +431,7 @@ public class BlockingBufferTest<E> exten
             try {
                 // wait for other thread to block on get() or remove()
                 Thread.sleep(delay);
-            } catch (InterruptedException e) {
+            } catch (final InterruptedException e) {
             }
             buffer.add(obj);
         }
@@ -445,13 +445,13 @@ public class BlockingBufferTest<E> exten
 
         long delay = 100;
 
-        public DelayedAddAll(Buffer<E> buffer, E obj, long delay) {
+        public DelayedAddAll(final Buffer<E> buffer, final E obj, final long delay) {
             this.buffer = buffer;
             this.obj = obj;
             this.delay = delay;
         }
 
-        DelayedAddAll(Buffer<E> buffer, E obj) {
+        DelayedAddAll(final Buffer<E> buffer, final E obj) {
             super();
             this.buffer = buffer;
             this.obj = obj;
@@ -462,7 +462,7 @@ public class BlockingBufferTest<E> exten
             try {
                 // wait for other thread to block on get() or remove()
                 Thread.sleep(delay);
-            } catch (InterruptedException e) {
+            } catch (final InterruptedException e) {
             }
             buffer.addAll(Collections.singleton(obj));
         }
@@ -480,20 +480,20 @@ public class BlockingBufferTest<E> exten
 
         Set<E> objs;
 
-        ReadThread(Buffer<E> buffer, Object obj) {
+        ReadThread(final Buffer<E> buffer, final Object obj) {
             super();
             this.buffer = buffer;
             this.obj = obj;
         }
 
-        ReadThread(Buffer<E> buffer, Object obj, ArrayList<String> exceptionList) {
+        ReadThread(final Buffer<E> buffer, final Object obj, final ArrayList<String> exceptionList) {
             super();
             this.buffer = buffer;
             this.obj = obj;
             this.exceptionList = exceptionList;
         }
 
-        ReadThread(Buffer<E> buffer, Object obj, ArrayList<String> exceptionList, String action) {
+        ReadThread(final Buffer<E> buffer, final Object obj, final ArrayList<String> exceptionList, final String action) {
             super();
             this.buffer = buffer;
             this.obj = obj;
@@ -501,7 +501,7 @@ public class BlockingBufferTest<E> exten
             this.action = action;
         }
 
-        ReadThread(Buffer<E> buffer, Set<E> objs, String action) {
+        ReadThread(final Buffer<E> buffer, final Set<E> objs, final String action) {
             super();
             this.buffer = buffer;
             this.objs = objs;
@@ -520,7 +520,7 @@ public class BlockingBufferTest<E> exten
                         assertTrue(objs.remove(buffer.remove()));
                     }
                 }
-            } catch (BufferUnderflowException ex) {
+            } catch (final BufferUnderflowException ex) {
                 exceptionList.add("BufferUnderFlow");
             }
         }
@@ -548,7 +548,7 @@ public class BlockingBufferTest<E> exten
     private void delay() {
         try {
             Thread.sleep( 200 );
-        } catch (InterruptedException e) {
+        } catch (final InterruptedException e) {
         }
     }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/BoundedBufferTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/BoundedBufferTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/BoundedBufferTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/BoundedBufferTest.java Mon Jan  7 17:15:14 2013
@@ -27,7 +27,7 @@ import java.util.Arrays;
 
 public class BoundedBufferTest<E> extends AbstractObjectTest {
 
-    public BoundedBufferTest(String testName) {
+    public BoundedBufferTest(final String testName) {
         super(testName);
     }
 
@@ -50,7 +50,7 @@ public class BoundedBufferTest<E> extend
     @SuppressWarnings("unchecked")
     public void testMaxSize() {
         final Buffer<E> bounded = BoundedBuffer.boundedBuffer(new UnboundedFifoBuffer<E>(), 2, 500);
-        BoundedCollection<?> bc = (BoundedCollection<?>) bounded;
+        final BoundedCollection<?> bc = (BoundedCollection<?>) bounded;
         assertEquals(2, bc.maxSize());
         assertEquals(false, bc.isFull());
         bounded.add((E) "A");
@@ -62,11 +62,11 @@ public class BoundedBufferTest<E> extend
         try {
             BoundedBuffer.boundedBuffer(new UnboundedFifoBuffer<E>(), 0);
             fail();
-        } catch (IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {}
         try {
             BoundedBuffer.boundedBuffer(new UnboundedFifoBuffer<E>(), -1);
             fail();
-        } catch (IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {}
     }
 
     @SuppressWarnings("unchecked")
@@ -76,7 +76,7 @@ public class BoundedBufferTest<E> extend
         try {
             bounded.add((E) "World");
             fail();
-        } catch (BufferOverflowException e) {
+        } catch (final BufferOverflowException e) {
         }
     }
 
@@ -87,7 +87,7 @@ public class BoundedBufferTest<E> extend
         try {
             bounded.addAll(Collections.singleton((E) "World"));
             fail();
-        } catch (BufferOverflowException e) {
+        } catch (final BufferOverflowException e) {
         }
     }
 
@@ -97,7 +97,7 @@ public class BoundedBufferTest<E> extend
         try {
             bounded.addAll(Collections.nCopies(2, (E) "test"));
             fail();
-        } catch (BufferOverflowException e) {
+        } catch (final BufferOverflowException e) {
         }
     }
 
@@ -135,7 +135,7 @@ public class BoundedBufferTest<E> extend
         try {
             bounded.add((E) "!");
             fail();
-        } catch (BufferOverflowException e) {
+        } catch (final BufferOverflowException e) {
         }
     }
 
@@ -152,7 +152,7 @@ public class BoundedBufferTest<E> extend
         try {
             bounded.add((E) "!");
             fail();
-        } catch (BufferOverflowException e) {
+        } catch (final BufferOverflowException e) {
         }
     }
 
@@ -164,13 +164,13 @@ public class BoundedBufferTest<E> extend
 
         private final int nToRemove;
 
-        public DelayedIteratorRemove(Buffer<?> buffer, long delay, int nToRemove) {
+        public DelayedIteratorRemove(final Buffer<?> buffer, final long delay, final int nToRemove) {
             this.buffer = buffer;
             this.delay = delay;
             this.nToRemove = nToRemove;
         }
 
-        public DelayedIteratorRemove(Buffer<?> buffer, long delay) {
+        public DelayedIteratorRemove(final Buffer<?> buffer, final long delay) {
             this(buffer, delay, 1);
         }
 
@@ -178,13 +178,13 @@ public class BoundedBufferTest<E> extend
         public void run() {
             try {
                 Thread.sleep(delay);
-                Iterator<?> iter = buffer.iterator();
+                final Iterator<?> iter = buffer.iterator();
                 for (int i = 0; i < nToRemove; ++i) {
                     iter.next();
                     iter.remove();
                 }
 
-            } catch (InterruptedException e) {
+            } catch (final InterruptedException e) {
             }
         }
     }
@@ -197,13 +197,13 @@ public class BoundedBufferTest<E> extend
 
         private final int nToRemove;
 
-        public DelayedRemove(Buffer<?> buffer, long delay, int nToRemove) {
+        public DelayedRemove(final Buffer<?> buffer, final long delay, final int nToRemove) {
             this.buffer = buffer;
             this.delay = delay;
             this.nToRemove = nToRemove;
         }
 
-        public DelayedRemove(Buffer<?> buffer, long delay) {
+        public DelayedRemove(final Buffer<?> buffer, final long delay) {
             this(buffer, delay, 1);
         }
 
@@ -214,7 +214,7 @@ public class BoundedBufferTest<E> extend
                 for (int i = 0; i < nToRemove; ++i) {
                     buffer.remove();
                 }
-            } catch (InterruptedException e) {
+            } catch (final InterruptedException e) {
             }
         }
     }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/BoundedFifoBuffer2Test.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/BoundedFifoBuffer2Test.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/BoundedFifoBuffer2Test.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/BoundedFifoBuffer2Test.java Mon Jan  7 17:15:14 2013
@@ -32,7 +32,7 @@ import org.apache.commons.collections.Bu
  */
 public class BoundedFifoBuffer2Test<E> extends BoundedFifoBufferTest<E> {
 
-    public BoundedFifoBuffer2Test(String n) {
+    public BoundedFifoBuffer2Test(final String n) {
         super(n);
     }
 
@@ -79,7 +79,7 @@ public class BoundedFifoBuffer2Test<E> e
         try {
             getCollection().add(getOtherElements()[0]);
             fail("add should raise BufferOverflow.");
-        } catch (BufferOverflowException e) {
+        } catch (final BufferOverflowException e) {
             // expected
         }
         verify();
@@ -87,7 +87,7 @@ public class BoundedFifoBuffer2Test<E> e
         try {
             getCollection().addAll(Arrays.asList(getOtherElements()));
             fail("addAll should raise BufferOverflow.");
-        } catch (BufferOverflowException e) {
+        } catch (final BufferOverflowException e) {
             // expected
         }
         verify();

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/BoundedFifoBufferTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/BoundedFifoBufferTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/BoundedFifoBufferTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/BoundedFifoBufferTest.java Mon Jan  7 17:15:14 2013
@@ -34,7 +34,7 @@ import org.apache.commons.collections.co
  */
 public class BoundedFifoBufferTest<E> extends AbstractCollectionTest<E> {
 
-    public BoundedFifoBufferTest(String n) {
+    public BoundedFifoBufferTest(final String n) {
         super(n);
     }
 
@@ -51,12 +51,12 @@ public class BoundedFifoBufferTest<E> ex
     @Override
     public void verify() {
         super.verify();
-        Iterator<E> iterator1 = getCollection().iterator();
-        Iterator<E> iterator2 = getConfirmed().iterator();
+        final Iterator<E> iterator1 = getCollection().iterator();
+        final Iterator<E> iterator2 = getConfirmed().iterator();
         while (iterator2.hasNext()) {
             assertTrue(iterator1.hasNext());
-            E o1 = iterator1.next();
-            E o2 = iterator2.next();
+            final E o1 = iterator1.next();
+            final E o2 = iterator2.next();
             assertEquals(o1, o2);
         }
     }
@@ -98,7 +98,7 @@ public class BoundedFifoBufferTest<E> ex
      */
     @Override
     public List<E> makeConfirmedFullCollection() {
-        List<E> c = makeConfirmedCollection();
+        final List<E> c = makeConfirmedCollection();
         c.addAll(java.util.Arrays.asList(getFullElements()));
         return c;
     }
@@ -119,10 +119,10 @@ public class BoundedFifoBufferTest<E> ex
      */
     public void testBoundedFifoBufferRemove() {
         resetFull();
-        int size = getConfirmed().size();
+        final int size = getConfirmed().size();
         for (int i = 0; i < size; i++) {
-            E o1 = getCollection().remove();
-            E o2 = getConfirmed().remove(0);
+            final E o1 = getCollection().remove();
+            final E o2 = getConfirmed().remove(0);
             assertEquals("Removed objects should be equal", o1, o2);
             verify();
         }
@@ -130,7 +130,7 @@ public class BoundedFifoBufferTest<E> ex
         try {
             getCollection().remove();
             fail("Empty buffer should raise Underflow.");
-        } catch (BufferUnderflowException e) {
+        } catch (final BufferUnderflowException e) {
             // expected
         }
     }
@@ -141,7 +141,7 @@ public class BoundedFifoBufferTest<E> ex
     public void testConstructorException1() {
         try {
             new BoundedFifoBuffer<E>(0);
-        } catch (IllegalArgumentException ex) {
+        } catch (final IllegalArgumentException ex) {
             return;
         }
         fail();
@@ -153,7 +153,7 @@ public class BoundedFifoBufferTest<E> ex
     public void testConstructorException2() {
         try {
             new BoundedFifoBuffer<E>(-20);
-        } catch (IllegalArgumentException ex) {
+        } catch (final IllegalArgumentException ex) {
             return;
         }
         fail();
@@ -165,7 +165,7 @@ public class BoundedFifoBufferTest<E> ex
     public void testConstructorException3() {
         try {
             new BoundedFifoBuffer<E>(null);
-        } catch (NullPointerException ex) {
+        } catch (final NullPointerException ex) {
             return;
         }
         fail();
@@ -179,14 +179,14 @@ public class BoundedFifoBufferTest<E> ex
         try {
             getCollection().get(-1);
             fail();
-        } catch (NoSuchElementException ex) {
+        } catch (final NoSuchElementException ex) {
             // expected
         }
         
         try {
             getCollection().get(getCollection().size());
             fail();
-        } catch (NoSuchElementException ex) {
+        } catch (final NoSuchElementException ex) {
             // expected
         }
     }
@@ -194,8 +194,8 @@ public class BoundedFifoBufferTest<E> ex
     public void testGetIndex() {
         resetFull();
         
-        BoundedFifoBuffer<E> buffer = getCollection();
-        List<E> confirmed = getConfirmed();
+        final BoundedFifoBuffer<E> buffer = getCollection();
+        final List<E> confirmed = getConfirmed();
         for (int i = 0; i < confirmed.size(); i++) {
             assertEquals(confirmed.get(i), buffer.get(i));
         }
@@ -217,7 +217,7 @@ public class BoundedFifoBufferTest<E> ex
     // BZ 33071 -- gets start=end=1 before removal of interior element
     @SuppressWarnings("unchecked")
     public void testShift() {
-        BoundedFifoBuffer<E> fifo = new BoundedFifoBuffer<E>(3);
+        final BoundedFifoBuffer<E> fifo = new BoundedFifoBuffer<E>(3);
         fifo.add((E) "a");
         fifo.add((E) "b");
         fifo.add((E) "c");

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/CircularFifoBufferTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/CircularFifoBufferTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/CircularFifoBufferTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/CircularFifoBufferTest.java Mon Jan  7 17:15:14 2013
@@ -38,7 +38,7 @@ import org.apache.commons.collections.co
  */
 public class CircularFifoBufferTest<E> extends AbstractCollectionTest<E> {
 
-    public CircularFifoBufferTest(String n) {
+    public CircularFifoBufferTest(final String n) {
         super(n);
     }
 
@@ -55,12 +55,12 @@ public class CircularFifoBufferTest<E> e
     @Override
     public void verify() {
         super.verify();
-        Iterator<E> iterator1 = getCollection().iterator();
-        Iterator<E> iterator2 = getConfirmed().iterator();
+        final Iterator<E> iterator1 = getCollection().iterator();
+        final Iterator<E> iterator2 = getConfirmed().iterator();
         while (iterator2.hasNext()) {
             assertTrue(iterator1.hasNext());
-            Object o1 = iterator1.next();
-            Object o2 = iterator2.next();
+            final Object o1 = iterator1.next();
+            final Object o2 = iterator2.next();
             assertEquals(o1, o2);
         }
     }
@@ -102,7 +102,7 @@ public class CircularFifoBufferTest<E> e
      */
     @Override
     public Collection<E> makeConfirmedFullCollection() {
-        Collection<E> c = makeConfirmedCollection();
+        final Collection<E> c = makeConfirmedCollection();
         c.addAll(java.util.Arrays.asList(getFullElements()));
         return c;
     }
@@ -123,11 +123,11 @@ public class CircularFifoBufferTest<E> e
      */
     @SuppressWarnings("unchecked")
     public void testCircularFifoBufferCircular() {
-        List<E> list = new ArrayList<E>();
+        final List<E> list = new ArrayList<E>();
         list.add((E) "A");
         list.add((E) "B");
         list.add((E) "C");
-        Buffer<E> buf = new CircularFifoBuffer<E>(list);
+        final Buffer<E> buf = new CircularFifoBuffer<E>(list);
 
         assertEquals(true, buf.contains("A"));
         assertEquals(true, buf.contains("B"));
@@ -151,10 +151,10 @@ public class CircularFifoBufferTest<E> e
      */
     public void testCircularFifoBufferRemove() {
         resetFull();
-        int size = getConfirmed().size();
+        final int size = getConfirmed().size();
         for (int i = 0; i < size; i++) {
-            Object o1 = getCollection().remove();
-            Object o2 = getConfirmed().remove(0);
+            final Object o1 = getCollection().remove();
+            final Object o2 = getConfirmed().remove(0);
             assertEquals("Removed objects should be equal", o1, o2);
             verify();
         }
@@ -162,7 +162,7 @@ public class CircularFifoBufferTest<E> e
         try {
             getCollection().remove();
             fail("Empty buffer should raise Underflow.");
-        } catch (BufferUnderflowException e) {
+        } catch (final BufferUnderflowException e) {
             // expected
         }
     }
@@ -173,7 +173,7 @@ public class CircularFifoBufferTest<E> e
     public void testConstructorException1() {
         try {
             new CircularFifoBuffer<E>(0);
-        } catch (IllegalArgumentException ex) {
+        } catch (final IllegalArgumentException ex) {
             return;
         }
         fail();
@@ -185,7 +185,7 @@ public class CircularFifoBufferTest<E> e
     public void testConstructorException2() {
         try {
             new CircularFifoBuffer<E>(-20);
-        } catch (IllegalArgumentException ex) {
+        } catch (final IllegalArgumentException ex) {
             return;
         }
         fail();
@@ -197,7 +197,7 @@ public class CircularFifoBufferTest<E> e
     public void testConstructorException3() {
         try {
             new CircularFifoBuffer<E>(null);
-        } catch (NullPointerException ex) {
+        } catch (final NullPointerException ex) {
             return;
         }
         fail();
@@ -206,7 +206,7 @@ public class CircularFifoBufferTest<E> e
     @SuppressWarnings("unchecked")
     public void testRemoveError1() throws Exception {
         // based on bug 33071
-        CircularFifoBuffer<E> fifo = new CircularFifoBuffer<E>(5);
+        final CircularFifoBuffer<E> fifo = new CircularFifoBuffer<E>(5);
         fifo.add((E) "1");
         fifo.add((E) "2");
         fifo.add((E) "3");
@@ -225,7 +225,7 @@ public class CircularFifoBufferTest<E> e
     @SuppressWarnings("unchecked")
     public void testRemoveError2() throws Exception {
         // based on bug 33071
-        CircularFifoBuffer<E> fifo = new CircularFifoBuffer<E>(5);
+        final CircularFifoBuffer<E> fifo = new CircularFifoBuffer<E>(5);
         fifo.add((E) "1");
         fifo.add((E) "2");
         fifo.add((E) "3");
@@ -246,7 +246,7 @@ public class CircularFifoBufferTest<E> e
     @SuppressWarnings("unchecked")
     public void testRemoveError3() throws Exception {
         // based on bug 33071
-        CircularFifoBuffer<E> fifo = new CircularFifoBuffer<E>(5);
+        final CircularFifoBuffer<E> fifo = new CircularFifoBuffer<E>(5);
         fifo.add((E) "1");
         fifo.add((E) "2");
         fifo.add((E) "3");
@@ -269,7 +269,7 @@ public class CircularFifoBufferTest<E> e
     @SuppressWarnings("unchecked")
     public void testRemoveError4() throws Exception {
         // based on bug 33071
-        CircularFifoBuffer<E> fifo = new CircularFifoBuffer<E>(5);
+        final CircularFifoBuffer<E> fifo = new CircularFifoBuffer<E>(5);
         fifo.add((E) "1");
         fifo.add((E) "2");
         fifo.add((E) "3");
@@ -287,7 +287,7 @@ public class CircularFifoBufferTest<E> e
     @SuppressWarnings("unchecked")
     public void testRemoveError5() throws Exception {
         // based on bug 33071
-        CircularFifoBuffer<E> fifo = new CircularFifoBuffer<E>(5);
+        final CircularFifoBuffer<E> fifo = new CircularFifoBuffer<E>(5);
         fifo.add((E) "1");
         fifo.add((E) "2");
         fifo.add((E) "3");
@@ -305,7 +305,7 @@ public class CircularFifoBufferTest<E> e
     @SuppressWarnings("unchecked")
     public void testRemoveError6() throws Exception {
         // based on bug 33071
-        CircularFifoBuffer<E> fifo = new CircularFifoBuffer<E>(5);
+        final CircularFifoBuffer<E> fifo = new CircularFifoBuffer<E>(5);
         fifo.add((E) "1");
         fifo.add((E) "2");
         fifo.add((E) "3");
@@ -323,7 +323,7 @@ public class CircularFifoBufferTest<E> e
     @SuppressWarnings("unchecked")
     public void testRemoveError7() throws Exception {
         // based on bug 33071
-        CircularFifoBuffer<E> fifo = new CircularFifoBuffer<E>(5);
+        final CircularFifoBuffer<E> fifo = new CircularFifoBuffer<E>(5);
         fifo.add((E) "1");
         fifo.add((E) "2");
         fifo.add((E) "3");
@@ -341,7 +341,7 @@ public class CircularFifoBufferTest<E> e
     @SuppressWarnings("unchecked")
     public void testRemoveError8() throws Exception {
         // based on bug 33071
-        CircularFifoBuffer<E> fifo = new CircularFifoBuffer<E>(5);
+        final CircularFifoBuffer<E> fifo = new CircularFifoBuffer<E>(5);
         fifo.add((E) "1");
         fifo.add((E) "2");
         fifo.add((E) "3");
@@ -360,7 +360,7 @@ public class CircularFifoBufferTest<E> e
     @SuppressWarnings("unchecked")
     public void testRemoveError9() throws Exception {
         // based on bug 33071
-        CircularFifoBuffer<E> fifo = new CircularFifoBuffer<E>(5);
+        final CircularFifoBuffer<E> fifo = new CircularFifoBuffer<E>(5);
         fifo.add((E) "1");
         fifo.add((E) "2");
         fifo.add((E) "3");
@@ -380,7 +380,7 @@ public class CircularFifoBufferTest<E> e
     @SuppressWarnings("unchecked")
     public void testRepeatedSerialization() throws Exception {
         // bug 31433
-        CircularFifoBuffer<E> b = new CircularFifoBuffer<E>(2);
+        final CircularFifoBuffer<E> b = new CircularFifoBuffer<E>(2);
         b.add((E) "a");
         assertEquals(1, b.size());
         assertEquals(true, b.contains("a"));
@@ -388,7 +388,7 @@ public class CircularFifoBufferTest<E> e
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
         new ObjectOutputStream(bos).writeObject(b);
 
-        CircularFifoBuffer<E> b2 = (CircularFifoBuffer<E>) new ObjectInputStream(
+        final CircularFifoBuffer<E> b2 = (CircularFifoBuffer<E>) new ObjectInputStream(
             new ByteArrayInputStream(bos.toByteArray())).readObject();
 
         assertEquals(1, b2.size());
@@ -401,7 +401,7 @@ public class CircularFifoBufferTest<E> e
         bos = new ByteArrayOutputStream();
         new ObjectOutputStream(bos).writeObject(b2);
 
-        CircularFifoBuffer<E> b3 = (CircularFifoBuffer<E>) new ObjectInputStream(
+        final CircularFifoBuffer<E> b3 = (CircularFifoBuffer<E>) new ObjectInputStream(
             new ByteArrayInputStream(bos.toByteArray())).readObject();
 
         assertEquals(2, b3.size());
@@ -416,8 +416,8 @@ public class CircularFifoBufferTest<E> e
     public void testGetIndex() {
         resetFull();
         
-        CircularFifoBuffer<E> buffer = getCollection();
-        List<E> confirmed = getConfirmed();
+        final CircularFifoBuffer<E> buffer = getCollection();
+        final List<E> confirmed = getConfirmed();
         for (int i = 0; i < confirmed.size(); i++) {
             assertEquals(confirmed.get(i), buffer.get(i));
         }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/PredicatedBufferTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/PredicatedBufferTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/PredicatedBufferTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/PredicatedBufferTest.java Mon Jan  7 17:15:14 2013
@@ -33,13 +33,13 @@ import org.apache.commons.collections.co
  */
 public class PredicatedBufferTest<E> extends PredicatedCollectionTest<E> {
 
-    public PredicatedBufferTest(String testName) {
+    public PredicatedBufferTest(final String testName) {
         super(testName);
     }
 
     //---------------------------------------------------------------
 
-    protected Buffer<E> decorateCollection(Buffer<E> buffer, Predicate<E> predicate) {
+    protected Buffer<E> decorateCollection(final Buffer<E> buffer, final Predicate<E> predicate) {
         return PredicatedBuffer.predicatedBuffer(buffer, predicate);
     }
 
@@ -55,7 +55,7 @@ public class PredicatedBufferTest<E> ext
 
     @Override
     public Collection<E> makeConfirmedFullCollection() {
-        ArrayStack<E> list = new ArrayStack<E>();
+        final ArrayStack<E> list = new ArrayStack<E>();
         list.addAll(java.util.Arrays.asList(getFullElements()));
         return list;
     }
@@ -68,11 +68,11 @@ public class PredicatedBufferTest<E> ext
 
     @SuppressWarnings("unchecked")
     public void testGet() {
-        Buffer<E> buffer = makeTestBuffer();
+        final Buffer<E> buffer = makeTestBuffer();
         try {
             buffer.get();
             fail("Expecting BufferUnderflowException");
-        } catch (BufferUnderflowException ex) {
+        } catch (final BufferUnderflowException ex) {
             // expected
         }
         buffer.add((E) "one");
@@ -83,13 +83,13 @@ public class PredicatedBufferTest<E> ext
 
     @SuppressWarnings("unchecked")
     public void testRemove() {
-        Buffer<E> buffer = makeTestBuffer();
+        final Buffer<E> buffer = makeTestBuffer();
         buffer.add((E) "one");
         assertEquals("Buffer get", "one", buffer.remove());
         try {
             buffer.remove();
             fail("Expecting BufferUnderflowException");
-        } catch (BufferUnderflowException ex) {
+        } catch (final BufferUnderflowException ex) {
             // expected
         }
     }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/PriorityBufferTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/PriorityBufferTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/PriorityBufferTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/PriorityBufferTest.java Mon Jan  7 17:15:14 2013
@@ -39,7 +39,7 @@ import org.apache.commons.collections.co
 @SuppressWarnings("boxing")
 public class PriorityBufferTest<E> extends AbstractCollectionTest<E> {
 
-    public PriorityBufferTest(String testName) {
+    public PriorityBufferTest(final String testName) {
         super(testName);
     }
 
@@ -48,7 +48,7 @@ public class PriorityBufferTest<E> exten
     @SuppressWarnings("unchecked")
     public void verify() {
         super.verify();
-        PriorityBuffer<E> heap = getCollection();
+        final PriorityBuffer<E> heap = getCollection();
 
         Comparator<? super E> c = heap.comparator;
         if (c == null) {
@@ -58,9 +58,9 @@ public class PriorityBufferTest<E> exten
             c = ComparatorUtils.reversedComparator(c);
         }
 
-        E[] tree = heap.elements;
+        final E[] tree = heap.elements;
         for (int i = 1; i <= heap.size; i++) {
-            E parent = tree[i];
+            final E parent = tree[i];
             if (i * 2 <= heap.size) {
                 assertTrue("Parent is less than or equal to its left child", c.compare(parent, tree[i * 2]) <= 0);
             }
@@ -88,7 +88,7 @@ public class PriorityBufferTest<E> exten
 
     @Override
     public Collection<E> makeConfirmedFullCollection() {
-        ArrayList<E> list = new ArrayList<E>();
+        final ArrayList<E> list = new ArrayList<E>();
         list.addAll(Arrays.asList(getFullElements()));
         return list;
     }
@@ -117,24 +117,24 @@ public class PriorityBufferTest<E> exten
     //-----------------------------------------------------------------------
     public void testBufferEmpty() {
         resetEmpty();
-        Buffer<E> buffer = getCollection();
+        final Buffer<E> buffer = getCollection();
 
         assertEquals(0, buffer.size());
         assertEquals(true, buffer.isEmpty());
         try {
             buffer.get();
             fail();
-        } catch (BufferUnderflowException ex) {}
+        } catch (final BufferUnderflowException ex) {}
 
         try {
             buffer.remove();
             fail();
-        } catch (BufferUnderflowException ex) {}
+        } catch (final BufferUnderflowException ex) {}
     }
 
     @SuppressWarnings("unchecked")
     public void testBasicOps() {
-        PriorityBuffer<E> heap = new PriorityBuffer<E>();
+        final PriorityBuffer<E> heap = new PriorityBuffer<E>();
         heap.add((E) "a");
         heap.add((E) "c");
         heap.add((E) "e");
@@ -173,29 +173,29 @@ public class PriorityBufferTest<E> exten
         try {
             heap.get();
             fail("NoSuchElementException should be thrown if get is called after all elements are removed");
-        } catch (BufferUnderflowException ex) {}
+        } catch (final BufferUnderflowException ex) {}
 
         try {
             heap.remove();
             fail("NoSuchElementException should be thrown if remove is called after all elements are removed");
-        } catch (BufferUnderflowException ex) {}
+        } catch (final BufferUnderflowException ex) {}
     }
 
     @SuppressWarnings("unchecked")
     public void testBasicComparatorOps() {
-        PriorityBuffer<E> heap = new PriorityBuffer<E>(new ReverseComparator<E>((Comparator<E>) ComparableComparator.INSTANCE));
+        final PriorityBuffer<E> heap = new PriorityBuffer<E>(new ReverseComparator<E>((Comparator<E>) ComparableComparator.INSTANCE));
 
         assertTrue("heap should be empty after create", heap.isEmpty());
 
         try {
             heap.get();
             fail("NoSuchElementException should be thrown if get is called before any elements are added");
-        } catch (BufferUnderflowException ex) {}
+        } catch (final BufferUnderflowException ex) {}
 
         try {
             heap.remove();
             fail("NoSuchElementException should be thrown if remove is called before any elements are added");
-        } catch (BufferUnderflowException ex) {}
+        } catch (final BufferUnderflowException ex) {}
 
         heap.add((E) "a");
         heap.add((E) "c");
@@ -239,12 +239,12 @@ public class PriorityBufferTest<E> exten
         try {
             heap.get();
             fail("NoSuchElementException should be thrown if get is called after all elements are removed");
-        } catch (BufferUnderflowException ex) {}
+        } catch (final BufferUnderflowException ex) {}
 
         try {
             heap.remove();
             fail("NoSuchElementException should be thrown if remove is called after all elements are removed");
-        } catch (BufferUnderflowException ex) {}
+        } catch (final BufferUnderflowException ex) {}
     }
 
     /**
@@ -253,7 +253,7 @@ public class PriorityBufferTest<E> exten
     @SuppressWarnings("unchecked")
     public void testAddRemove() {
         resetEmpty();
-        PriorityBuffer heap = getCollection();
+        final PriorityBuffer heap = getCollection();
         heap.add(0);
         heap.add(2);
         heap.add(4);
@@ -279,10 +279,10 @@ public class PriorityBufferTest<E> exten
      *
      */
     public void testRandom() {
-        int iterations = 500;
-        int heapSize = 100;
-        int operations = 20;
-        Random randGenerator = new Random();
+        final int iterations = 500;
+        final int heapSize = 100;
+        final int operations = 20;
+        final Random randGenerator = new Random();
         PriorityBuffer<Integer> h = null;
         for (int i = 0; i < iterations; i++) {
             if (i < iterations / 2) {
@@ -305,7 +305,7 @@ public class PriorityBufferTest<E> exten
      * Pops all elements from the heap and verifies that the elements come off
      * in the correct order.  NOTE: this method empties the heap.
      */
-    protected void checkOrder(PriorityBuffer<?> h) {
+    protected void checkOrder(final PriorityBuffer<?> h) {
         Integer lastNum = null;
         Integer num = null;
         while (!h.isEmpty()) {
@@ -324,9 +324,9 @@ public class PriorityBufferTest<E> exten
      * Returns a string showing the contents of the heap formatted as a tree.
      * Makes no attempt at padding levels or handling wrapping.
      */
-    protected String showTree(PriorityBuffer<?> h) {
+    protected String showTree(final PriorityBuffer<?> h) {
         int count = 1;
-        StringBuilder buffer = new StringBuilder();
+        final StringBuilder buffer = new StringBuilder();
         for (int offset = 1; count < h.size() + 1; offset *= 2) {
             for (int i = offset; i < offset * 2; i++) {
                 if (i < h.elements.length && h.elements[i] != null) {
@@ -354,10 +354,10 @@ public class PriorityBufferTest<E> exten
      */
     @SuppressWarnings("unchecked")
     public void testSerialization() {
-        int iterations = 500;
-        int heapSize = 100;
+        final int iterations = 500;
+        final int heapSize = 100;
         PriorityBuffer h;
-        Random randGenerator = new Random();
+        final Random randGenerator = new Random();
         for (int i = 0; i < iterations; i++) {
             if (i < iterations / 2) {
                 h = new PriorityBuffer<E>(true);
@@ -368,26 +368,26 @@ public class PriorityBufferTest<E> exten
                 h.add(new Integer(randGenerator.nextInt(heapSize)));
             }
             assertTrue(h.size() == heapSize);
-            PriorityBuffer<?> h1 = serializeAndRestore(h);
+            final PriorityBuffer<?> h1 = serializeAndRestore(h);
             assertTrue(h1.size() == heapSize);
-            Iterator<?> hit = h.iterator();
+            final Iterator<?> hit = h.iterator();
             while (hit.hasNext()) {
-                Integer n = (Integer) hit.next();
+                final Integer n = (Integer) hit.next();
                 assertTrue(h1.contains(n));
             }
             checkOrder(h1);
         }
     }
 
-    public PriorityBuffer<?> serializeAndRestore(PriorityBuffer<E> h) {
+    public PriorityBuffer<?> serializeAndRestore(final PriorityBuffer<E> h) {
         PriorityBuffer<?> h1 = null;
         try {
-            byte[] objekt = writeExternalFormToBytes(h);
+            final byte[] objekt = writeExternalFormToBytes(h);
             h1 = (PriorityBuffer<?>) readExternalFormFromBytes(objekt);
-        } catch (IOException e) {
+        } catch (final IOException e) {
             e.printStackTrace();
             fail(e.toString());
-        } catch (ClassNotFoundException e) {
+        } catch (final ClassNotFoundException e) {
             e.printStackTrace();
             fail(e.toString());
         }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/SynchronizedBufferTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/SynchronizedBufferTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/SynchronizedBufferTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/SynchronizedBufferTest.java Mon Jan  7 17:15:14 2013
@@ -32,7 +32,7 @@ import org.apache.commons.collections.co
  */
 public class SynchronizedBufferTest<E> extends AbstractCollectionTest<E> {
 
-    public SynchronizedBufferTest(String testName) {
+    public SynchronizedBufferTest(final String testName) {
         super(testName);
     }
 
@@ -44,7 +44,7 @@ public class SynchronizedBufferTest<E> e
 
     @Override
     public Collection<E> makeFullCollection() {
-        Buffer<E> buffer = new UnboundedFifoBuffer<E>();
+        final Buffer<E> buffer = new UnboundedFifoBuffer<E>();
         buffer.addAll(Arrays.asList(getFullElements()));
         return SynchronizedBuffer.synchronizedBuffer(buffer);
     }
@@ -56,7 +56,7 @@ public class SynchronizedBufferTest<E> e
 
     @Override
     public Collection<E> makeConfirmedFullCollection() {
-        ArrayStack<E> list = new ArrayStack<E>();
+        final ArrayStack<E> list = new ArrayStack<E>();
         list.addAll(Arrays.asList(getFullElements()));
         return list;
     }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/TransformedBufferTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/TransformedBufferTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/TransformedBufferTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/TransformedBufferTest.java Mon Jan  7 17:15:14 2013
@@ -30,14 +30,14 @@ import org.apache.commons.collections.co
  */
 public class TransformedBufferTest extends TestCase {
     
-    public TransformedBufferTest(String testName) {
+    public TransformedBufferTest(final String testName) {
         super(testName);
     }
 
     public void testTransformedBuffer() {
-        Buffer<Object> buffer = TransformedBuffer.transformingBuffer(new ArrayStack<Object>(), TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER);
+        final Buffer<Object> buffer = TransformedBuffer.transformingBuffer(new ArrayStack<Object>(), TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER);
         assertEquals(0, buffer.size());
-        Object[] els = new Object[] { "1", "3", "5", "7", "2", "4", "6" };
+        final Object[] els = new Object[] { "1", "3", "5", "7", "2", "4", "6" };
         for (int i = 0; i < els.length; i++) {
             buffer.add(els[i]);
             assertEquals(i + 1, buffer.size());
@@ -51,14 +51,14 @@ public class TransformedBufferTest exten
     }
 
     public void testTransformedBuffer_decorateTransform() {
-        Buffer originalBuffer = new ArrayStack();
-        Object[] els = new Object[] {"1", "3", "5", "7", "2", "4", "6"};
-        for (Object el : els) {
+        final Buffer originalBuffer = new ArrayStack();
+        final Object[] els = new Object[] {"1", "3", "5", "7", "2", "4", "6"};
+        for (final Object el : els) {
             originalBuffer.add(el);
         }
-        Buffer buffer = TransformedBuffer.transformedBuffer(originalBuffer, TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER);
+        final Buffer buffer = TransformedBuffer.transformedBuffer(originalBuffer, TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER);
         assertEquals(els.length, buffer.size());
-        for (Object el : els) {
+        for (final Object el : els) {
             assertEquals(true, buffer.contains(new Integer((String) el)));
             assertEquals(false, buffer.contains(el));
         }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/UnboundedFifoBufferTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/UnboundedFifoBufferTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/UnboundedFifoBufferTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/UnboundedFifoBufferTest.java Mon Jan  7 17:15:14 2013
@@ -33,7 +33,7 @@ import org.apache.commons.collections.co
  */
 public class UnboundedFifoBufferTest<E> extends AbstractCollectionTest<E> {
 
-    public UnboundedFifoBufferTest(String n) {
+    public UnboundedFifoBufferTest(final String n) {
         super(n);
     }
 
@@ -49,12 +49,12 @@ public class UnboundedFifoBufferTest<E> 
     @Override
     public void verify() {
         super.verify();
-        Iterator<E> iterator1 = getCollection().iterator();
-        Iterator<E> iterator2 = getConfirmed().iterator();
+        final Iterator<E> iterator1 = getCollection().iterator();
+        final Iterator<E> iterator2 = getConfirmed().iterator();
         while (iterator2.hasNext()) {
             assertTrue(iterator1.hasNext());
-            Object o1 = iterator1.next();
-            Object o2 = iterator2.next();
+            final Object o1 = iterator1.next();
+            final Object o2 = iterator2.next();
             assertEquals(o1, o2);
         }
     }
@@ -96,7 +96,7 @@ public class UnboundedFifoBufferTest<E> 
      */
     @Override
     public Collection<E> makeConfirmedFullCollection() {
-        Collection<E> c = makeConfirmedCollection();
+        final Collection<E> c = makeConfirmedCollection();
         c.addAll(java.util.Arrays.asList(getFullElements()));
         return c;
     }
@@ -117,10 +117,10 @@ public class UnboundedFifoBufferTest<E> 
      */
     public void testUnboundedFifoBufferRemove() {
         resetFull();
-        int size = getConfirmed().size();
+        final int size = getConfirmed().size();
         for (int i = 0; i < size; i++) {
-            E o1 = getCollection().remove();
-            E o2 = getConfirmed().remove(0);
+            final E o1 = getCollection().remove();
+            final E o2 = getConfirmed().remove(0);
             assertEquals("Removed objects should be equal", o1, o2);
             verify();
         }
@@ -132,7 +132,7 @@ public class UnboundedFifoBufferTest<E> 
     public void testConstructorException1() {
         try {
             new UnboundedFifoBuffer<E>(0);
-        } catch (IllegalArgumentException ex) {
+        } catch (final IllegalArgumentException ex) {
             return;
         }
         fail();
@@ -144,7 +144,7 @@ public class UnboundedFifoBufferTest<E> 
     public void testConstructorException2() {
         try {
             new UnboundedFifoBuffer<E>(-20);
-        } catch (IllegalArgumentException ex) {
+        } catch (final IllegalArgumentException ex) {
             return;
         }
         fail();
@@ -153,7 +153,7 @@ public class UnboundedFifoBufferTest<E> 
     //-----------------------------------------------------------------------
     @SuppressWarnings("unchecked")
     public void testInternalStateAdd() {
-        UnboundedFifoBuffer<E> test = new UnboundedFifoBuffer<E>(2);
+        final UnboundedFifoBuffer<E> test = new UnboundedFifoBuffer<E>(2);
         assertEquals(3, test.buffer.length);
         assertEquals(0, test.head);
         assertEquals(0, test.tail);
@@ -177,7 +177,7 @@ public class UnboundedFifoBufferTest<E> 
 
     @SuppressWarnings("unchecked")
     public void testInternalStateAddWithWrap() {
-        UnboundedFifoBuffer<E> test = new UnboundedFifoBuffer<E>(3);
+        final UnboundedFifoBuffer<E> test = new UnboundedFifoBuffer<E>(3);
         assertEquals(4, test.buffer.length);
         assertEquals(0, test.head);
         assertEquals(0, test.tail);
@@ -213,7 +213,7 @@ public class UnboundedFifoBufferTest<E> 
 
     @SuppressWarnings("unchecked")
     public void testInternalStateRemove1() {
-        UnboundedFifoBuffer<E> test = new UnboundedFifoBuffer<E>(4);
+        final UnboundedFifoBuffer<E> test = new UnboundedFifoBuffer<E>(4);
         test.add((E) "A");
         test.add((E) "B");
         test.add((E) "C");
@@ -234,7 +234,7 @@ public class UnboundedFifoBufferTest<E> 
 
     @SuppressWarnings("unchecked")
     public void testInternalStateRemove2() {
-        UnboundedFifoBuffer<E> test = new UnboundedFifoBuffer<E>(4);
+        final UnboundedFifoBuffer<E> test = new UnboundedFifoBuffer<E>(4);
         test.add((E) "A");
         test.add((E) "B");
         test.add((E) "C");
@@ -255,7 +255,7 @@ public class UnboundedFifoBufferTest<E> 
 
     @SuppressWarnings("unchecked")
     public void testInternalStateIteratorRemove1() {
-        UnboundedFifoBuffer<E> test = new UnboundedFifoBuffer<E>(4);
+        final UnboundedFifoBuffer<E> test = new UnboundedFifoBuffer<E>(4);
         test.add((E) "A");
         test.add((E) "B");
         test.add((E) "C");
@@ -263,7 +263,7 @@ public class UnboundedFifoBufferTest<E> 
         assertEquals(0, test.head);
         assertEquals(3, test.tail);
         
-        Iterator<E> it = test.iterator();
+        final Iterator<E> it = test.iterator();
         it.next();
         it.remove();
         assertEquals(5, test.buffer.length);
@@ -278,12 +278,12 @@ public class UnboundedFifoBufferTest<E> 
 
     @SuppressWarnings("unchecked")
     public void testInternalStateIteratorRemove2() {
-        UnboundedFifoBuffer<E> test = new UnboundedFifoBuffer<E>(4);
+        final UnboundedFifoBuffer<E> test = new UnboundedFifoBuffer<E>(4);
         test.add((E) "A");
         test.add((E) "B");
         test.add((E) "C");
         
-        Iterator<E> it = test.iterator();
+        final Iterator<E> it = test.iterator();
         it.next();
         it.next();
         it.remove();
@@ -299,7 +299,7 @@ public class UnboundedFifoBufferTest<E> 
 
     @SuppressWarnings("unchecked")
     public void testInternalStateIteratorRemoveWithTailAtEnd1() {
-        UnboundedFifoBuffer<E> test = new UnboundedFifoBuffer<E>(3);
+        final UnboundedFifoBuffer<E> test = new UnboundedFifoBuffer<E>(3);
         test.add((E) "A");
         test.add((E) "B");
         test.add((E) "C");
@@ -309,7 +309,7 @@ public class UnboundedFifoBufferTest<E> 
         assertEquals(1, test.head);
         assertEquals(0, test.tail);
         
-        Iterator<E> it = test.iterator();
+        final Iterator<E> it = test.iterator();
         assertEquals("B", it.next());
         it.remove();
         assertEquals(4, test.buffer.length);
@@ -319,7 +319,7 @@ public class UnboundedFifoBufferTest<E> 
 
     @SuppressWarnings("unchecked")
     public void testInternalStateIteratorRemoveWithTailAtEnd2() {
-        UnboundedFifoBuffer<E> test = new UnboundedFifoBuffer<E>(3);
+        final UnboundedFifoBuffer<E> test = new UnboundedFifoBuffer<E>(3);
         test.add((E) "A");
         test.add((E) "B");
         test.add((E) "C");
@@ -329,7 +329,7 @@ public class UnboundedFifoBufferTest<E> 
         assertEquals(1, test.head);
         assertEquals(0, test.tail);
         
-        Iterator<E> it = test.iterator();
+        final Iterator<E> it = test.iterator();
         assertEquals("B", it.next());
         assertEquals("C", it.next());
         it.remove();
@@ -340,7 +340,7 @@ public class UnboundedFifoBufferTest<E> 
 
     @SuppressWarnings("unchecked")
     public void testInternalStateIteratorRemoveWithTailAtEnd3() {
-        UnboundedFifoBuffer<E> test = new UnboundedFifoBuffer<E>(3);
+        final UnboundedFifoBuffer<E> test = new UnboundedFifoBuffer<E>(3);
         test.add((E) "A");
         test.add((E) "B");
         test.add((E) "C");
@@ -350,7 +350,7 @@ public class UnboundedFifoBufferTest<E> 
         assertEquals(1, test.head);
         assertEquals(0, test.tail);
         
-        Iterator<E> it = test.iterator();
+        final Iterator<E> it = test.iterator();
         assertEquals("B", it.next());
         assertEquals("C", it.next());
         assertEquals("D", it.next());
@@ -362,7 +362,7 @@ public class UnboundedFifoBufferTest<E> 
 
     @SuppressWarnings("unchecked")
     public void testInternalStateIteratorRemoveWithWrap1() {
-        UnboundedFifoBuffer<E> test = new UnboundedFifoBuffer<E>(3);
+        final UnboundedFifoBuffer<E> test = new UnboundedFifoBuffer<E>(3);
         test.add((E) "A");
         test.add((E) "B");
         test.add((E) "C");
@@ -374,7 +374,7 @@ public class UnboundedFifoBufferTest<E> 
         assertEquals(2, test.head);
         assertEquals(1, test.tail);
         
-        Iterator<E> it = test.iterator();
+        final Iterator<E> it = test.iterator();
         assertEquals("C", it.next());
         it.remove();
         assertEquals(4, test.buffer.length);
@@ -384,7 +384,7 @@ public class UnboundedFifoBufferTest<E> 
 
     @SuppressWarnings("unchecked")
     public void testInternalStateIteratorRemoveWithWrap2() {
-        UnboundedFifoBuffer<E> test = new UnboundedFifoBuffer<E>(3);
+        final UnboundedFifoBuffer<E> test = new UnboundedFifoBuffer<E>(3);
         test.add((E) "A");
         test.add((E) "B");
         test.add((E) "C");
@@ -396,7 +396,7 @@ public class UnboundedFifoBufferTest<E> 
         assertEquals(2, test.head);
         assertEquals(1, test.tail);
         
-        Iterator<E> it = test.iterator();
+        final Iterator<E> it = test.iterator();
         assertEquals("C", it.next());
         assertEquals("D", it.next());
         it.remove();
@@ -407,7 +407,7 @@ public class UnboundedFifoBufferTest<E> 
 
     @SuppressWarnings("unchecked")
     public void testInternalStateIteratorRemoveWithWrap3() {
-        UnboundedFifoBuffer<E> test = new UnboundedFifoBuffer<E>(3);
+        final UnboundedFifoBuffer<E> test = new UnboundedFifoBuffer<E>(3);
         test.add((E) "A");
         test.add((E) "B");
         test.add((E) "C");
@@ -419,7 +419,7 @@ public class UnboundedFifoBufferTest<E> 
         assertEquals(2, test.head);
         assertEquals(1, test.tail);
         
-        Iterator<E> it = test.iterator();
+        final Iterator<E> it = test.iterator();
         assertEquals("C", it.next());
         assertEquals("D", it.next());
         assertEquals("E", it.next());

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/UnmodifiableBufferTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/UnmodifiableBufferTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/UnmodifiableBufferTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/UnmodifiableBufferTest.java Mon Jan  7 17:15:14 2013
@@ -32,7 +32,7 @@ import org.apache.commons.collections.co
  */
 public class UnmodifiableBufferTest<E> extends AbstractCollectionTest<E> {
 
-    public UnmodifiableBufferTest(String testName) {
+    public UnmodifiableBufferTest(final String testName) {
         super(testName);
     }
 
@@ -44,7 +44,7 @@ public class UnmodifiableBufferTest<E> e
 
     @Override
     public Collection<E> makeFullCollection() {
-        Buffer<E> buffer = new UnboundedFifoBuffer<E>();
+        final Buffer<E> buffer = new UnboundedFifoBuffer<E>();
         buffer.addAll(Arrays.asList(getFullElements()));
         return UnmodifiableBuffer.unmodifiableBuffer(buffer);
     }
@@ -56,7 +56,7 @@ public class UnmodifiableBufferTest<E> e
 
     @Override
     public Collection<E> makeConfirmedFullCollection() {
-        ArrayStack<E> list = new ArrayStack<E>();
+        final ArrayStack<E> list = new ArrayStack<E>();
         list.addAll(Arrays.asList(getFullElements()));
         return list;
     }
@@ -81,7 +81,7 @@ public class UnmodifiableBufferTest<E> e
         try {
             getCollection().remove();
             fail();
-        } catch (UnsupportedOperationException ex) {}
+        } catch (final UnsupportedOperationException ex) {}
     }
 
     @Override



Mime
View raw message