commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1429905 [21/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/iterators/IteratorChainTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/IteratorChainTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/IteratorChainTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/IteratorChainTest.java Mon Jan  7 17:15:14 2013
@@ -39,7 +39,7 @@ public class IteratorChainTest extends A
     protected List<String> list2 = null;
     protected List<String> list3 = null;
 
-    public IteratorChainTest(String testName) {
+    public IteratorChainTest(final String testName) {
         super(testName);
     }
 
@@ -58,13 +58,13 @@ public class IteratorChainTest extends A
 
     @Override
     public IteratorChain<String> makeEmptyIterator() {
-        ArrayList<String> list = new ArrayList<String>();
+        final ArrayList<String> list = new ArrayList<String>();
         return new IteratorChain<String>(list.iterator());
     }
 
     @Override
     public IteratorChain<String> makeObject() {
-        IteratorChain<String> chain = new IteratorChain<String>();
+        final IteratorChain<String> chain = new IteratorChain<String>();
 
         chain.addIterator(list1.iterator());
         chain.addIterator(list2.iterator());
@@ -73,9 +73,9 @@ public class IteratorChainTest extends A
     }
 
     public void testIterator() {
-        Iterator<String> iter = makeObject();
-        for (String testValue : testArray) {
-            Object iterValue = iter.next();
+        final Iterator<String> iter = makeObject();
+        for (final String testValue : testArray) {
+            final Object iterValue = iter.next();
 
             assertEquals( "Iteration value is correct", testValue, iterValue );
         }
@@ -84,7 +84,7 @@ public class IteratorChainTest extends A
 
         try {
             iter.next();
-        } catch (Exception e) {
+        } catch (final Exception e) {
             assertTrue("NoSuchElementException must be thrown", 
                        e.getClass().equals(new NoSuchElementException().getClass()));
         }
@@ -93,23 +93,23 @@ public class IteratorChainTest extends A
     public void testRemoveFromFilteredIterator() {
 
         final Predicate<Integer> myPredicate = new Predicate<Integer>() {
-            public boolean evaluate(Integer i) {
+            public boolean evaluate(final Integer i) {
                 return i.compareTo(new Integer(4)) < 0;
             }
         };
 
-        List<Integer> list1 = new ArrayList<Integer>();
-        List<Integer> list2 = new ArrayList<Integer>();
+        final List<Integer> list1 = new ArrayList<Integer>();
+        final List<Integer> list2 = new ArrayList<Integer>();
 
         list1.add(new Integer(1));
         list1.add(new Integer(2));
         list2.add(new Integer(3));
         list2.add(new Integer(4)); // will be ignored by the predicate
 
-        Iterator<Integer> it1 = IteratorUtils.filteredIterator(list1.iterator(), myPredicate);
-        Iterator<Integer> it2 = IteratorUtils.filteredIterator(list2.iterator(), myPredicate);
+        final Iterator<Integer> it1 = IteratorUtils.filteredIterator(list1.iterator(), myPredicate);
+        final Iterator<Integer> it2 = IteratorUtils.filteredIterator(list2.iterator(), myPredicate);
 
-        Iterator<Integer> it = IteratorUtils.chainedIterator(it1, it2);
+        final Iterator<Integer> it = IteratorUtils.chainedIterator(it1, it2);
         while (it.hasNext()) {
             it.next();
             it.remove();
@@ -120,17 +120,17 @@ public class IteratorChainTest extends A
     
     @Override
     public void testRemove() {
-        Iterator<String> iter = makeObject();
+        final Iterator<String> iter = makeObject();
 
         try {
             iter.remove();
             fail("Calling remove before the first call to next() should throw an exception");
-        } catch (IllegalStateException e) {
+        } catch (final IllegalStateException e) {
 
         }
 
-        for (String testValue : testArray) {
-            String iterValue = iter.next();
+        for (final String testValue : testArray) {
+            final String iterValue = iter.next();
 
             assertEquals("Iteration value is correct", testValue, iterValue);
 
@@ -145,12 +145,12 @@ public class IteratorChainTest extends A
     }
 
     public void testFirstIteratorIsEmptyBug() {
-        List<String> empty = new ArrayList<String>();
-        List<String> notEmpty = new ArrayList<String>();
+        final List<String> empty = new ArrayList<String>();
+        final List<String> notEmpty = new ArrayList<String>();
         notEmpty.add("A");
         notEmpty.add("B");
         notEmpty.add("C");
-        IteratorChain<String> chain = new IteratorChain<String>();
+        final IteratorChain<String> chain = new IteratorChain<String>();
         chain.addIterator(empty.iterator());
         chain.addIterator(notEmpty.iterator());
         assertTrue("should have next",chain.hasNext());
@@ -163,16 +163,16 @@ public class IteratorChainTest extends A
     }
     
     public void testEmptyChain() {
-        IteratorChain<Object> chain = new IteratorChain<Object>();
+        final IteratorChain<Object> chain = new IteratorChain<Object>();
         assertEquals(false, chain.hasNext());
         try {
             chain.next();
             fail();
-        } catch (NoSuchElementException ex) {}
+        } catch (final NoSuchElementException ex) {}
         try {
             chain.remove();
             fail();
-        } catch (IllegalStateException ex) {}
+        } catch (final IllegalStateException ex) {}
     }
         
 }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/IteratorIterableTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/IteratorIterableTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/IteratorIterableTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/IteratorIterableTest.java Mon Jan  7 17:15:14 2013
@@ -32,36 +32,36 @@ public class IteratorIterableTest extend
         return BulkTest.makeSuite(IteratorIterableTest.class);
     }
 
-    public IteratorIterableTest(String name) {
+    public IteratorIterableTest(final String name) {
         super(name);
     }
 
     private Iterator<Integer> createIterator() {
-        List<Integer> list = new ArrayList<Integer>();
+        final List<Integer> list = new ArrayList<Integer>();
         list.add(Integer.valueOf(0));
         list.add(Integer.valueOf(1));
         list.add(Integer.valueOf(2));
-        Iterator<Integer> iter = list.iterator();
+        final Iterator<Integer> iter = list.iterator();
         return iter;
     }
 
     public void testIterator() {
-        Iterator<Integer> iter = createIterator();
-        Iterable<Number> iterable = new IteratorIterable<Number>(iter);
+        final Iterator<Integer> iter = createIterator();
+        final Iterable<Number> iterable = new IteratorIterable<Number>(iter);
         
         // first use
         verifyIteration(iterable);
         
         // second use
-        for (@SuppressWarnings("unused") Number actual : iterable) {
+        for (@SuppressWarnings("unused") final Number actual : iterable) {
             fail("should not be able to iterate twice");
         }
     }
 
     public void testMultipleUserIterator() {
-        Iterator<Integer> iter = createIterator();
+        final Iterator<Integer> iter = createIterator();
 
-        Iterable<Number> iterable = new IteratorIterable<Number>(iter, true);
+        final Iterable<Number> iterable = new IteratorIterable<Number>(iter, true);
         
         // first use
         verifyIteration(iterable);
@@ -70,9 +70,9 @@ public class IteratorIterableTest extend
         verifyIteration(iterable);
     }
 
-    private void verifyIteration(Iterable<Number> iterable) {
+    private void verifyIteration(final Iterable<Number> iterable) {
         int expected = 0;
-        for (Number actual : iterable) {
+        for (final Number actual : iterable) {
             assertEquals(expected, actual.intValue());
             ++expected;
         }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ListIteratorWrapper2Test.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ListIteratorWrapper2Test.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ListIteratorWrapper2Test.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ListIteratorWrapper2Test.java Mon Jan  7 17:15:14 2013
@@ -36,7 +36,7 @@ public class ListIteratorWrapper2Test<E>
 
     protected List<E> list1 = null;
 
-    public ListIteratorWrapper2Test(String testName) {
+    public ListIteratorWrapper2Test(final String testName) {
         super(testName);
     }
 
@@ -54,7 +54,7 @@ public class ListIteratorWrapper2Test<E>
 
     @Override
     public ResettableListIterator<E> makeEmptyIterator() {
-        ArrayList<E> list = new ArrayList<E>();
+        final ArrayList<E> list = new ArrayList<E>();
         return new ListIteratorWrapper<E>(list.listIterator());
     }
 
@@ -64,9 +64,9 @@ public class ListIteratorWrapper2Test<E>
     }
 
     public void testIterator() {
-        ListIterator<E> iter = makeObject();
-        for (String testValue : testArray) {
-            Object iterValue = iter.next();
+        final ListIterator<E> iter = makeObject();
+        for (final String testValue : testArray) {
+            final Object iterValue = iter.next();
 
             assertEquals("Iteration value is correct", testValue, iterValue);
         }
@@ -75,29 +75,29 @@ public class ListIteratorWrapper2Test<E>
 
         try {
             iter.next();
-        } catch (Exception e) {
+        } catch (final Exception e) {
             assertTrue("NoSuchElementException must be thrown",
                        e.getClass().equals(new NoSuchElementException().getClass()));
         }
 
         // now, read it backwards
         for (int i = testArray.length - 1; i > -1; --i) {
-            Object testValue = testArray[i];
-            E iterValue = iter.previous();
+            final Object testValue = testArray[i];
+            final E iterValue = iter.previous();
 
             assertEquals( "Iteration value is correct", testValue, iterValue );
         }
 
         try {
             iter.previous();
-        } catch (Exception e) {
+        } catch (final Exception e) {
             assertTrue("NoSuchElementException must be thrown",
                        e.getClass().equals(new NoSuchElementException().getClass()));
         }
 
         // now, read it forwards again
-        for (String testValue : testArray) {
-            Object iterValue = iter.next();
+        for (final String testValue : testArray) {
+            final Object iterValue = iter.next();
 
             assertEquals("Iteration value is correct", testValue, iterValue);
         }
@@ -106,7 +106,7 @@ public class ListIteratorWrapper2Test<E>
 
     @Override
     public void testRemove() {
-        ListIterator<E> iter = makeObject();
+        final ListIterator<E> iter = makeObject();
 
         //initial state:
         assertEquals(-1, iter.previousIndex());
@@ -115,7 +115,7 @@ public class ListIteratorWrapper2Test<E>
         try {
             iter.remove();
             fail("ListIteratorWrapper#remove() should fail; must be initially positioned first");
-        } catch (IllegalStateException e) {
+        } catch (final IllegalStateException e) {
         }
 
         //no change from invalid op:
@@ -140,7 +140,7 @@ public class ListIteratorWrapper2Test<E>
         try {
             iter.remove();
             fail("ListIteratorWrapper#remove() should fail; must be repositioned first");
-        } catch (IllegalStateException e) {
+        } catch (final IllegalStateException e) {
         }
 
         //no change from invalid op:
@@ -182,9 +182,9 @@ public class ListIteratorWrapper2Test<E>
     }
 
     public void testReset() {
-        ResettableListIterator<E> iter = makeObject();
-        E first = iter.next();
-        E second = iter.next();
+        final ResettableListIterator<E> iter = makeObject();
+        final E first = iter.next();
+        final E second = iter.next();
 
         iter.reset();
 
@@ -197,8 +197,8 @@ public class ListIteratorWrapper2Test<E>
 
         // after passing the point, where we resetted, continuation should work as expected
         for (int i = 2; i < testArray.length; i++) {
-            Object testValue = testArray[i];
-            E iterValue = iter.next();
+            final Object testValue = testArray[i];
+            final E iterValue = iter.next();
 
             assertEquals("Iteration value is correct", testValue, iterValue);
         }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ListIteratorWrapperTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ListIteratorWrapperTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ListIteratorWrapperTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ListIteratorWrapperTest.java Mon Jan  7 17:15:14 2013
@@ -37,7 +37,7 @@ public class ListIteratorWrapperTest<E> 
 
     protected List<E> list1 = null;
 
-    public ListIteratorWrapperTest(String testName) {
+    public ListIteratorWrapperTest(final String testName) {
         super(testName);
     }
 
@@ -55,7 +55,7 @@ public class ListIteratorWrapperTest<E> 
 
     @Override
     public ResettableListIterator<E> makeEmptyIterator() {
-        ArrayList<E> list = new ArrayList<E>();
+        final ArrayList<E> list = new ArrayList<E>();
         return new ListIteratorWrapper<E>(list.iterator());
     }
 
@@ -65,9 +65,9 @@ public class ListIteratorWrapperTest<E> 
     }
 
     public void testIterator() {
-        ListIterator<E> iter = makeObject();
-        for (String testValue : testArray) {
-            Object iterValue = iter.next();
+        final ListIterator<E> iter = makeObject();
+        for (final String testValue : testArray) {
+            final Object iterValue = iter.next();
 
             assertEquals("Iteration value is correct", testValue, iterValue);
         }
@@ -76,29 +76,29 @@ public class ListIteratorWrapperTest<E> 
 
         try {
             iter.next();
-        } catch (Exception e) {
+        } catch (final Exception e) {
             assertTrue("NoSuchElementException must be thrown",
                        e.getClass().equals(new NoSuchElementException().getClass()));
         }
 
         // now, read it backwards
         for (int i = testArray.length - 1; i > -1; --i) {
-            Object testValue = testArray[i];
-            E iterValue = iter.previous();
+            final Object testValue = testArray[i];
+            final E iterValue = iter.previous();
 
             assertEquals( "Iteration value is correct", testValue, iterValue );
         }
 
         try {
             iter.previous();
-        } catch (Exception e) {
+        } catch (final Exception e) {
             assertTrue("NoSuchElementException must be thrown",
                        e.getClass().equals(new NoSuchElementException().getClass()));
         }
 
         // now, read it forwards again
-        for (String testValue : testArray) {
-            Object iterValue = iter.next();
+        for (final String testValue : testArray) {
+            final Object iterValue = iter.next();
 
             assertEquals("Iteration value is correct", testValue, iterValue);
         }
@@ -107,7 +107,7 @@ public class ListIteratorWrapperTest<E> 
 
     @Override
     public void testRemove() {
-        ListIterator<E> iter = makeObject();
+        final ListIterator<E> iter = makeObject();
 
         //initial state:
         assertEquals(-1, iter.previousIndex());
@@ -116,7 +116,7 @@ public class ListIteratorWrapperTest<E> 
         try {
             iter.remove();
             fail("ListIteratorWrapper#remove() should fail; must be initially positioned first");
-        } catch (IllegalStateException e) {
+        } catch (final IllegalStateException e) {
         }
 
         //no change from invalid op:
@@ -141,7 +141,7 @@ public class ListIteratorWrapperTest<E> 
         try {
             iter.remove();
             fail("ListIteratorWrapper#remove() should fail; must be repositioned first");
-        } catch (IllegalStateException e) {
+        } catch (final IllegalStateException e) {
         }
 
         //no change from invalid op:
@@ -176,7 +176,7 @@ public class ListIteratorWrapperTest<E> 
         try {
             iter.remove();
             fail("ListIteratorWrapper does not support the remove() method while dug into the cache via previous()");
-        } catch (IllegalStateException e) {
+        } catch (final IllegalStateException e) {
         }
 
         //no change from invalid op:
@@ -205,9 +205,9 @@ public class ListIteratorWrapperTest<E> 
     }
 
     public void testReset() {
-        ResettableListIterator<E> iter = makeObject();
-        E first = iter.next();
-        E second = iter.next();
+        final ResettableListIterator<E> iter = makeObject();
+        final E first = iter.next();
+        final E second = iter.next();
 
         iter.reset();
 
@@ -220,8 +220,8 @@ public class ListIteratorWrapperTest<E> 
 
         // after passing the point, where we resetted, continuation should work as expected
         for (int i = 2; i < testArray.length; i++) {
-            Object testValue = testArray[i];
-            E iterValue = iter.next();
+            final Object testValue = testArray[i];
+            final E iterValue = iter.next();
 
             assertEquals("Iteration value is correct", testValue, iterValue);
         }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/LoopingIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/LoopingIteratorTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/LoopingIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/LoopingIteratorTest.java Mon Jan  7 17:15:14 2013
@@ -30,7 +30,7 @@ import junit.framework.TestCase;
  */
 public class LoopingIteratorTest extends TestCase {
 
-    public LoopingIteratorTest(String testName) {
+    public LoopingIteratorTest(final String testName) {
         super(testName);
     }
 
@@ -41,7 +41,7 @@ public class LoopingIteratorTest extends
         try {
             new LoopingIterator<Object>(null);
             fail();
-        } catch (NullPointerException ex) {
+        } catch (final NullPointerException ex) {
         }
     }
     
@@ -50,14 +50,14 @@ public class LoopingIteratorTest extends
      * @throws Exception  If something unexpected occurs.
      */
     public void testLooping0() throws Exception {
-        List<Object> list = new ArrayList<Object>();
-        LoopingIterator<Object> loop = new LoopingIterator<Object>(list);
+        final List<Object> list = new ArrayList<Object>();
+        final LoopingIterator<Object> loop = new LoopingIterator<Object>(list);
         assertTrue("hasNext should return false", loop.hasNext() == false);
 
         try {
             loop.next();
             fail("NoSuchElementException was not thrown during next() call.");
-        } catch (NoSuchElementException ex) {
+        } catch (final NoSuchElementException ex) {
         }
     }
 
@@ -66,8 +66,8 @@ public class LoopingIteratorTest extends
      * @throws Exception  If something unexpected occurs.
      */
     public void testLooping1() throws Exception {
-        List<String> list = Arrays.asList(new String[] { "a" });
-        LoopingIterator<String> loop = new LoopingIterator<String>(list);
+        final List<String> list = Arrays.asList(new String[] { "a" });
+        final LoopingIterator<String> loop = new LoopingIterator<String>(list);
 
         assertTrue("1st hasNext should return true", loop.hasNext());
         assertEquals("a", loop.next());
@@ -85,8 +85,8 @@ public class LoopingIteratorTest extends
      * @throws Exception  If something unexpected occurs.
      */
     public void testLooping2() throws Exception {
-        List<String> list = Arrays.asList(new String[] { "a", "b" });
-        LoopingIterator<String> loop = new LoopingIterator<String>(list);
+        final List<String> list = Arrays.asList(new String[] { "a", "b" });
+        final LoopingIterator<String> loop = new LoopingIterator<String>(list);
 
         assertTrue("1st hasNext should return true", loop.hasNext());
         assertEquals("a", loop.next());
@@ -104,8 +104,8 @@ public class LoopingIteratorTest extends
      * @throws Exception  If something unexpected occurs.
      */
     public void testLooping3() throws Exception {
-        List<String> list = Arrays.asList(new String[] { "a", "b", "c" });
-        LoopingIterator<String> loop = new LoopingIterator<String>(list);
+        final List<String> list = Arrays.asList(new String[] { "a", "b", "c" });
+        final LoopingIterator<String> loop = new LoopingIterator<String>(list);
 
         assertTrue("1st hasNext should return true", loop.hasNext());
         assertEquals("a", loop.next());
@@ -126,8 +126,8 @@ public class LoopingIteratorTest extends
      * @throws Exception  If something unexpected occurs.
      */
     public void testRemoving1() throws Exception {
-        List<String> list = new ArrayList<String>(Arrays.asList(new String[] { "a", "b", "c" }));
-        LoopingIterator<String> loop = new LoopingIterator<String>(list);
+        final List<String> list = new ArrayList<String>(Arrays.asList(new String[] { "a", "b", "c" }));
+        final LoopingIterator<String> loop = new LoopingIterator<String>(list);
         assertEquals("list should have 3 elements.", 3, list.size());
 
         assertTrue("1st hasNext should return true", loop.hasNext());
@@ -149,7 +149,7 @@ public class LoopingIteratorTest extends
         try {
             loop.next();
             fail("Expected NoSuchElementException to be thrown.");
-        } catch (NoSuchElementException ex) {
+        } catch (final NoSuchElementException ex) {
         }
     }
 
@@ -158,8 +158,8 @@ public class LoopingIteratorTest extends
      * @throws Exception  If something unexpected occurs.
      */
     public void testReset() throws Exception {
-        List<String> list = Arrays.asList(new String[] { "a", "b", "c" });
-        LoopingIterator<String> loop = new LoopingIterator<String>(list);
+        final List<String> list = Arrays.asList(new String[] { "a", "b", "c" });
+        final LoopingIterator<String> loop = new LoopingIterator<String>(list);
 
         assertEquals("a", loop.next());
         assertEquals("b", loop.next());
@@ -180,8 +180,8 @@ public class LoopingIteratorTest extends
      * @throws Exception  If something unexpected occurs.
      */
     public void testSize() throws Exception {
-        List<String> list = new ArrayList<String>(Arrays.asList(new String[] { "a", "b", "c" }));
-        LoopingIterator<String> loop = new LoopingIterator<String>(list);
+        final List<String> list = new ArrayList<String>(Arrays.asList(new String[] { "a", "b", "c" }));
+        final LoopingIterator<String> loop = new LoopingIterator<String>(list);
 
         assertEquals(3, loop.size());
         loop.next();

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/LoopingListIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/LoopingListIteratorTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/LoopingListIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/LoopingListIteratorTest.java Mon Jan  7 17:15:14 2013
@@ -30,7 +30,7 @@ import junit.framework.TestCase;
  */
 public class LoopingListIteratorTest extends TestCase {
 
-    public LoopingListIteratorTest(String testName) {
+    public LoopingListIteratorTest(final String testName) {
         super(testName);
     }
     
@@ -41,7 +41,7 @@ public class LoopingListIteratorTest ext
         try {
             new LoopingListIterator<Object>(null);
             fail();
-        } catch (NullPointerException ex) {
+        } catch (final NullPointerException ex) {
         }
     }
 
@@ -49,21 +49,21 @@ public class LoopingListIteratorTest ext
      * Tests whether an empty looping list iterator works.
      */
     public void testLooping0() throws Exception {
-        List<Object> list = new ArrayList<Object>();
-        LoopingListIterator<Object> loop = new LoopingListIterator<Object>(list);
+        final List<Object> list = new ArrayList<Object>();
+        final LoopingListIterator<Object> loop = new LoopingListIterator<Object>(list);
         assertFalse(loop.hasNext());
         assertFalse(loop.hasPrevious());
         
         try {
             loop.next();
             fail();
-        } catch (NoSuchElementException ex) {
+        } catch (final NoSuchElementException ex) {
         }
 
         try {
             loop.previous();
             fail();
-        } catch (NoSuchElementException ex) {
+        } catch (final NoSuchElementException ex) {
         }
     }
 
@@ -72,8 +72,8 @@ public class LoopingListIteratorTest ext
      * one element.
      */
     public void testLooping1() throws Exception {
-        List<String> list = Arrays.asList(new String[] { "a" });
-        LoopingListIterator<String> loop = new LoopingListIterator<String>(list); // <a>
+        final List<String> list = Arrays.asList(new String[] { "a" });
+        final LoopingListIterator<String> loop = new LoopingListIterator<String>(list); // <a>
 
         assertTrue(loop.hasNext());
         assertEquals("a", loop.next());     // <a>
@@ -99,8 +99,8 @@ public class LoopingListIteratorTest ext
      * elements.
      */
     public void testLooping2() throws Exception {
-        List<String> list = Arrays.asList(new String[] { "a", "b" });
-        LoopingListIterator<String> loop = new LoopingListIterator<String>(list); // <a> b
+        final List<String> list = Arrays.asList(new String[] { "a", "b" });
+        final LoopingListIterator<String> loop = new LoopingListIterator<String>(list); // <a> b
 
         assertTrue(loop.hasNext());
         assertEquals("a", loop.next());     // a <b>
@@ -129,8 +129,8 @@ public class LoopingListIteratorTest ext
      * the begin/end boundary of the list.
      */
     public void testJoggingNotOverBoundary() {
-        List<String> list = Arrays.asList(new String[] { "a", "b" });
-        LoopingListIterator<String> loop = new LoopingListIterator<String>(list); // <a> b
+        final List<String> list = Arrays.asList(new String[] { "a", "b" });
+        final LoopingListIterator<String> loop = new LoopingListIterator<String>(list); // <a> b
     
         // Try jogging back and forth between the elements, but not
         // over the begin/end boundary.
@@ -149,8 +149,8 @@ public class LoopingListIteratorTest ext
      * begin/end boundary of the list.
      */
     public void testJoggingOverBoundary() {
-        List<String> list = Arrays.asList(new String[] { "a", "b" });
-        LoopingListIterator<String> loop = new LoopingListIterator<String>(list); // <a> b
+        final List<String> list = Arrays.asList(new String[] { "a", "b" });
+        final LoopingListIterator<String> loop = new LoopingListIterator<String>(list); // <a> b
     
         // Try jogging back and forth between the elements, but not
         // over the begin/end boundary.
@@ -167,8 +167,8 @@ public class LoopingListIteratorTest ext
      * Tests removing an element from a wrapped ArrayList.
      */
     public void testRemovingElementsAndIteratingForward() {
-        List<String> list = new ArrayList<String>(Arrays.asList(new String[] { "a", "b", "c" }));
-        LoopingListIterator<String> loop = new LoopingListIterator<String>(list); // <a> b c
+        final List<String> list = new ArrayList<String>(Arrays.asList(new String[] { "a", "b", "c" }));
+        final LoopingListIterator<String> loop = new LoopingListIterator<String>(list); // <a> b c
 
         assertTrue(loop.hasNext());
         assertEquals("a", loop.next()); // a <b> c
@@ -189,7 +189,7 @@ public class LoopingListIteratorTest ext
         try {
             loop.next();
             fail();
-        } catch (NoSuchElementException ex) {
+        } catch (final NoSuchElementException ex) {
         }
     }
 
@@ -197,8 +197,8 @@ public class LoopingListIteratorTest ext
      * Tests removing an element from a wrapped ArrayList.
      */
     public void testRemovingElementsAndIteratingBackwards() {
-        List<String> list = new ArrayList<String>(Arrays.asList(new String[] { "a", "b", "c" }));
-        LoopingListIterator<String> loop = new LoopingListIterator<String>(list); // <a> b c
+        final List<String> list = new ArrayList<String>(Arrays.asList(new String[] { "a", "b", "c" }));
+        final LoopingListIterator<String> loop = new LoopingListIterator<String>(list); // <a> b c
 
         assertTrue(loop.hasPrevious());
         assertEquals("c", loop.previous()); // a b <c>
@@ -219,7 +219,7 @@ public class LoopingListIteratorTest ext
         try {
             loop.previous();
             fail();
-        } catch (NoSuchElementException ex) {
+        } catch (final NoSuchElementException ex) {
         }
     }
 
@@ -227,8 +227,8 @@ public class LoopingListIteratorTest ext
      * Tests the reset method.
      */
     public void testReset() {
-        List<String> list = Arrays.asList(new String[] { "a", "b", "c" });
-        LoopingListIterator<String> loop = new LoopingListIterator<String>(list); // <a> b c
+        final List<String> list = Arrays.asList(new String[] { "a", "b", "c" });
+        final LoopingListIterator<String> loop = new LoopingListIterator<String>(list); // <a> b c
 
         assertEquals("a", loop.next()); // a <b> c
         assertEquals("b", loop.next()); // a b <c>
@@ -308,8 +308,8 @@ public class LoopingListIteratorTest ext
      * Tests nextIndex and previousIndex.
      */
     public void testNextAndPreviousIndex() {
-        List<String> list = Arrays.asList(new String[] { "a", "b", "c" });
-        LoopingListIterator<String> loop = new LoopingListIterator<String>(list); // <a> b c
+        final List<String> list = Arrays.asList(new String[] { "a", "b", "c" });
+        final LoopingListIterator<String> loop = new LoopingListIterator<String>(list); // <a> b c
 
         assertEquals(0, loop.nextIndex());
         assertEquals(2, loop.previousIndex());
@@ -339,8 +339,8 @@ public class LoopingListIteratorTest ext
      * Tests using the set method to change elements.
      */
     public void testSet() {
-        List<String> list = Arrays.asList(new String[] { "q", "r", "z" });
-        LoopingListIterator<String> loop = new LoopingListIterator<String>(list); // <q> r z
+        final List<String> list = Arrays.asList(new String[] { "q", "r", "z" });
+        final LoopingListIterator<String> loop = new LoopingListIterator<String>(list); // <q> r z
 
         assertEquals("z", loop.previous()); // q r <z>
         loop.set("c");                      // q r <c>

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ObjectArrayIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ObjectArrayIteratorTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ObjectArrayIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ObjectArrayIteratorTest.java Mon Jan  7 17:15:14 2013
@@ -28,7 +28,7 @@ public class ObjectArrayIteratorTest<E> 
 
     protected String[] testArray = { "One", "Two", "Three" };
 
-    public ObjectArrayIteratorTest(String testName) {
+    public ObjectArrayIteratorTest(final String testName) {
         super(testName);
     }
 
@@ -48,15 +48,15 @@ public class ObjectArrayIteratorTest<E> 
         return new ObjectArrayIterator<E>();
     }
 
-    public ObjectArrayIterator<E> makeArrayIterator(E[] array) {
+    public ObjectArrayIterator<E> makeArrayIterator(final E[] array) {
         return new ObjectArrayIterator<E>(array);
     }
 
-    public ObjectArrayIterator<E> makeArrayIterator(E[] array, int index) {
+    public ObjectArrayIterator<E> makeArrayIterator(final E[] array, final int index) {
         return new ObjectArrayIterator<E>(array, index);
     }
 
-    public ObjectArrayIterator<E> makeArrayIterator(E[] array, int start, int end) {
+    public ObjectArrayIterator<E> makeArrayIterator(final E[] array, final int start, final int end) {
         return new ObjectArrayIterator<E>(array, start, end);
     }
 
@@ -66,9 +66,9 @@ public class ObjectArrayIteratorTest<E> 
     }
 
     public void testIterator() {
-        Iterator<E> iter = makeObject();
-        for (String testValue : testArray) {
-            E iterValue = iter.next();
+        final Iterator<E> iter = makeObject();
+        for (final String testValue : testArray) {
+            final E iterValue = iter.next();
 
             assertEquals("Iteration value is correct", testValue, iterValue);
         }
@@ -77,7 +77,7 @@ public class ObjectArrayIteratorTest<E> 
 
         try {
             iter.next();
-        } catch (Exception e) {
+        } catch (final Exception e) {
             assertTrue(
                 "NoSuchElementException must be thrown",
                 e.getClass().equals(new NoSuchElementException().getClass()));
@@ -89,34 +89,34 @@ public class ObjectArrayIteratorTest<E> 
             makeArrayIterator(null);
 
             fail("Constructor should throw a NullPointerException when constructed with a null array");
-        } catch (NullPointerException e) {
+        } catch (final NullPointerException e) {
             // expected
         }
 
-        ObjectArrayIterator<E> iter = makeArrayIterator();
+        final ObjectArrayIterator<E> iter = makeArrayIterator();
         try {
             iter.setArray(null);
 
             fail("setArray(null) should throw a NullPointerException");
-        } catch (NullPointerException e) {
+        } catch (final NullPointerException e) {
             // expected
         }
     }
 
     @SuppressWarnings("unchecked")
     public void testDoubleSet() {
-        ObjectArrayIterator<E> it = makeArrayIterator();
+        final ObjectArrayIterator<E> it = makeArrayIterator();
         it.setArray((E[]) new String[0]);
         try {
             it.setArray((E[]) new String[0]);
             fail();
-        } catch (IllegalStateException ex) {
+        } catch (final IllegalStateException ex) {
         }
     }
 
     @SuppressWarnings("unchecked")
     public void testReset() {
-        ObjectArrayIterator<E> it = makeArrayIterator((E[]) testArray);
+        final ObjectArrayIterator<E> it = makeArrayIterator((E[]) testArray);
         it.next();
         it.reset();
         assertEquals("One", it.next());

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ObjectArrayListIterator2Test.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ObjectArrayListIterator2Test.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ObjectArrayListIterator2Test.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ObjectArrayListIterator2Test.java Mon Jan  7 17:15:14 2013
@@ -25,7 +25,7 @@ public class ObjectArrayListIterator2Tes
 
     protected String[] testArray = { "One", "Two", "Three" };
 
-    public ObjectArrayListIterator2Test(String testName) {
+    public ObjectArrayListIterator2Test(final String testName) {
         super(testName);
     }
 
@@ -41,7 +41,7 @@ public class ObjectArrayListIterator2Tes
         return new ObjectArrayListIterator<E>((E[]) testArray);
     }
 
-    public ObjectArrayListIterator<E> makeArrayListIterator(E[] array) {
+    public ObjectArrayListIterator<E> makeArrayListIterator(final E[] array) {
         return new ObjectArrayListIterator<E>(array);
     }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ObjectArrayListIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ObjectArrayListIteratorTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ObjectArrayListIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ObjectArrayListIteratorTest.java Mon Jan  7 17:15:14 2013
@@ -27,7 +27,7 @@ import java.util.NoSuchElementException;
  */
 public class ObjectArrayListIteratorTest<E> extends ObjectArrayIteratorTest<E> {
 
-    public ObjectArrayListIteratorTest(String testName) {
+    public ObjectArrayListIteratorTest(final String testName) {
         super(testName);
     }
 
@@ -43,7 +43,7 @@ public class ObjectArrayListIteratorTest
         return new ObjectArrayListIterator<E>((E[]) testArray);
     }
 
-    public ObjectArrayListIterator<E> makeArrayListIterator(E[] array) {
+    public ObjectArrayListIterator<E> makeArrayListIterator(final E[] array) {
         return new ObjectArrayListIterator<E>(array);
     }
 
@@ -52,7 +52,7 @@ public class ObjectArrayListIteratorTest
      * <code>previous()</code>.
      */
     public void testListIterator() {
-        ListIterator<E> iter = makeObject();
+        final ListIterator<E> iter = makeObject();
 
         // TestArrayIterator#testIterator() has already tested the iterator forward,
         //  now we need to test it in reverse
@@ -63,8 +63,8 @@ public class ObjectArrayListIteratorTest
         }
 
         for (int x = testArray.length - 1; x >= 0; x--) {
-            Object testValue = testArray[x];
-            Object iterValue = iter.previous();
+            final Object testValue = testArray[x];
+            final Object iterValue = iter.previous();
 
             assertEquals("Iteration value is correct", testValue, iterValue);
         }
@@ -73,7 +73,7 @@ public class ObjectArrayListIteratorTest
 
         try {
             iter.previous();
-        } catch (Exception e) {
+        } catch (final Exception e) {
             assertTrue(
                 "NoSuchElementException must be thrown",
                 e.getClass().equals(new NoSuchElementException().getClass()));
@@ -86,9 +86,9 @@ public class ObjectArrayListIteratorTest
      */
     @SuppressWarnings("unchecked")
     public void testListIteratorSet() {
-        String[] testData = new String[] { "a", "b", "c" };
+        final String[] testData = new String[] { "a", "b", "c" };
 
-        String[] result = new String[] { "0", "1", "2" };
+        final String[] result = new String[] { "0", "1", "2" };
 
         ListIterator<E> iter = makeArrayListIterator((E[]) testData);
         int x = 0;
@@ -107,9 +107,9 @@ public class ObjectArrayListIteratorTest
         try {
             iter.set((E) "should fail");
             fail("ListIterator#set should fail if next() or previous() have not yet been called.");
-        } catch (IllegalStateException e) {
+        } catch (final IllegalStateException e) {
             // expected
-        } catch (Throwable t) { // should never happen
+        } catch (final Throwable t) { // should never happen
             fail(t.toString());
         }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ObjectGraphIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ObjectGraphIteratorTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ObjectGraphIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ObjectGraphIteratorTest.java Mon Jan  7 17:15:14 2013
@@ -38,7 +38,7 @@ public class ObjectGraphIteratorTest ext
     protected List<String> list3 = null;
     protected List<Iterator<String>> iteratorList = null;
 
-    public ObjectGraphIteratorTest(String testName) {
+    public ObjectGraphIteratorTest(final String testName) {
         super(testName);
     }
 
@@ -62,7 +62,7 @@ public class ObjectGraphIteratorTest ext
     //-----------------------------------------------------------------------
     @Override
     public ObjectGraphIterator<Object> makeEmptyIterator() {
-        ArrayList<Object> list = new ArrayList<Object>();
+        final ArrayList<Object> list = new ArrayList<Object>();
         return new ObjectGraphIterator<Object>(list.iterator());
     }
 
@@ -73,63 +73,63 @@ public class ObjectGraphIteratorTest ext
 
     //-----------------------------------------------------------------------
     public void testIteratorConstructor_null1() {
-        Iterator<Object> it = new ObjectGraphIterator<Object>(null);
+        final Iterator<Object> it = new ObjectGraphIterator<Object>(null);
 
         assertEquals(false, it.hasNext());
         try {
             it.next();
             fail();
-        } catch (NoSuchElementException ex) {
+        } catch (final NoSuchElementException ex) {
         }
         try {
             it.remove();
             fail();
-        } catch (IllegalStateException ex) {
+        } catch (final IllegalStateException ex) {
         }
     }
 
     public void testIteratorConstructor_null_next() {
-        Iterator<Object> it = new ObjectGraphIterator<Object>(null);
+        final Iterator<Object> it = new ObjectGraphIterator<Object>(null);
         try {
             it.next();
             fail();
-        } catch (NoSuchElementException ex) {
+        } catch (final NoSuchElementException ex) {
         }
     }
 
     public void testIteratorConstructor_null_remove() {
-        Iterator<Object> it = new ObjectGraphIterator<Object>(null);
+        final Iterator<Object> it = new ObjectGraphIterator<Object>(null);
         try {
             it.remove();
             fail();
-        } catch (IllegalStateException ex) {
+        } catch (final IllegalStateException ex) {
         }
     }
 
     //-----------------------------------------------------------------------
     public void testIteratorConstructorIteration_Empty() {
-        List<Iterator<Object>> iteratorList = new ArrayList<Iterator<Object>>();
-        Iterator<Object> it = new ObjectGraphIterator<Object>(iteratorList.iterator());
+        final List<Iterator<Object>> iteratorList = new ArrayList<Iterator<Object>>();
+        final Iterator<Object> it = new ObjectGraphIterator<Object>(iteratorList.iterator());
 
         assertEquals(false, it.hasNext());
         try {
             it.next();
             fail();
-        } catch (NoSuchElementException ex) {
+        } catch (final NoSuchElementException ex) {
         }
         try {
             it.remove();
             fail();
-        } catch (IllegalStateException ex) {
+        } catch (final IllegalStateException ex) {
         }
     }
 
     public void testIteratorConstructorIteration_Simple() {
-        List<Iterator<String>> iteratorList = new ArrayList<Iterator<String>>();
+        final List<Iterator<String>> iteratorList = new ArrayList<Iterator<String>>();
         iteratorList.add(list1.iterator());
         iteratorList.add(list2.iterator());
         iteratorList.add(list3.iterator());
-        Iterator<Object> it = new ObjectGraphIterator<Object>(iteratorList.iterator());
+        final Iterator<Object> it = new ObjectGraphIterator<Object>(iteratorList.iterator());
 
         for (int i = 0; i < 6; i++) {
             assertEquals(true, it.hasNext());
@@ -139,16 +139,16 @@ public class ObjectGraphIteratorTest ext
         try {
             it.next();
             fail();
-        } catch (NoSuchElementException ex) {
+        } catch (final NoSuchElementException ex) {
         }
     }
 
     public void testIteratorConstructorIteration_SimpleNoHasNext() {
-        List<Iterator<String>> iteratorList = new ArrayList<Iterator<String>>();
+        final List<Iterator<String>> iteratorList = new ArrayList<Iterator<String>>();
         iteratorList.add(list1.iterator());
         iteratorList.add(list2.iterator());
         iteratorList.add(list3.iterator());
-        Iterator<Object> it = new ObjectGraphIterator<Object>(iteratorList.iterator());
+        final Iterator<Object> it = new ObjectGraphIterator<Object>(iteratorList.iterator());
 
         for (int i = 0; i < 6; i++) {
             assertEquals(testArray[i], it.next());
@@ -156,12 +156,12 @@ public class ObjectGraphIteratorTest ext
         try {
             it.next();
             fail();
-        } catch (NoSuchElementException ex) {
+        } catch (final NoSuchElementException ex) {
         }
     }
 
     public void testIteratorConstructorIteration_WithEmptyIterators() {
-        List<Iterator<String>> iteratorList = new ArrayList<Iterator<String>>();
+        final List<Iterator<String>> iteratorList = new ArrayList<Iterator<String>>();
         iteratorList.add(IteratorUtils.<String>emptyIterator());
         iteratorList.add(list1.iterator());
         iteratorList.add(IteratorUtils.<String>emptyIterator());
@@ -169,7 +169,7 @@ public class ObjectGraphIteratorTest ext
         iteratorList.add(IteratorUtils.<String>emptyIterator());
         iteratorList.add(list3.iterator());
         iteratorList.add(IteratorUtils.<String>emptyIterator());
-        Iterator<Object> it = new ObjectGraphIterator<Object>(iteratorList.iterator());
+        final Iterator<Object> it = new ObjectGraphIterator<Object>(iteratorList.iterator());
 
         for (int i = 0; i < 6; i++) {
             assertEquals(true, it.hasNext());
@@ -179,16 +179,16 @@ public class ObjectGraphIteratorTest ext
         try {
             it.next();
             fail();
-        } catch (NoSuchElementException ex) {
+        } catch (final NoSuchElementException ex) {
         }
     }
 
     public void testIteratorConstructorRemove() {
-        List<Iterator<String>> iteratorList = new ArrayList<Iterator<String>>();
+        final List<Iterator<String>> iteratorList = new ArrayList<Iterator<String>>();
         iteratorList.add(list1.iterator());
         iteratorList.add(list2.iterator());
         iteratorList.add(list3.iterator());
-        Iterator<Object> it = new ObjectGraphIterator<Object>(iteratorList.iterator());
+        final Iterator<Object> it = new ObjectGraphIterator<Object>(iteratorList.iterator());
 
         for (int i = 0; i < 6; i++) {
             assertEquals(testArray[i], it.next());
@@ -202,11 +202,11 @@ public class ObjectGraphIteratorTest ext
 
     //-----------------------------------------------------------------------
     public void testIteration_IteratorOfIterators() {
-        List<Iterator<String>> iteratorList = new ArrayList<Iterator<String>>();
+        final List<Iterator<String>> iteratorList = new ArrayList<Iterator<String>>();
         iteratorList.add(list1.iterator());
         iteratorList.add(list2.iterator());
         iteratorList.add(list3.iterator());
-        Iterator<Object> it = new ObjectGraphIterator<Object>(iteratorList.iterator(), null);
+        final Iterator<Object> it = new ObjectGraphIterator<Object>(iteratorList.iterator(), null);
 
         for (int i = 0; i < 6; i++) {
             assertEquals(true, it.hasNext());
@@ -216,7 +216,7 @@ public class ObjectGraphIteratorTest ext
     }
 
     public void testIteration_IteratorOfIteratorsWithEmptyIterators() {
-        List<Iterator<String>> iteratorList = new ArrayList<Iterator<String>>();
+        final List<Iterator<String>> iteratorList = new ArrayList<Iterator<String>>();
         iteratorList.add(IteratorUtils.<String>emptyIterator());
         iteratorList.add(list1.iterator());
         iteratorList.add(IteratorUtils.<String>emptyIterator());
@@ -224,7 +224,7 @@ public class ObjectGraphIteratorTest ext
         iteratorList.add(IteratorUtils.<String>emptyIterator());
         iteratorList.add(list3.iterator());
         iteratorList.add(IteratorUtils.<String>emptyIterator());
-        Iterator<Object> it = new ObjectGraphIterator<Object>(iteratorList.iterator(), null);
+        final Iterator<Object> it = new ObjectGraphIterator<Object>(iteratorList.iterator(), null);
 
         for (int i = 0; i < 6; i++) {
             assertEquals(true, it.hasNext());
@@ -235,24 +235,24 @@ public class ObjectGraphIteratorTest ext
 
     //-----------------------------------------------------------------------
     public void testIteration_RootNull() {
-        Iterator<Object> it = new ObjectGraphIterator<Object>(null, null);
+        final Iterator<Object> it = new ObjectGraphIterator<Object>(null, null);
 
         assertEquals(false, it.hasNext());
         try {
             it.next();
             fail();
-        } catch (NoSuchElementException ex) {
+        } catch (final NoSuchElementException ex) {
         }
         try {
             it.remove();
             fail();
-        } catch (IllegalStateException ex) {
+        } catch (final IllegalStateException ex) {
         }
     }
 
     public void testIteration_RootNoTransformer() {
-        Forest forest = new Forest();
-        Iterator<Object> it = new ObjectGraphIterator<Object>(forest, null);
+        final Forest forest = new Forest();
+        final Iterator<Object> it = new ObjectGraphIterator<Object>(forest, null);
 
         assertEquals(true, it.hasNext());
         assertSame(forest, it.next());
@@ -260,14 +260,14 @@ public class ObjectGraphIteratorTest ext
         try {
             it.next();
             fail();
-        } catch (NoSuchElementException ex) {
+        } catch (final NoSuchElementException ex) {
         }
     }
 
     public void testIteration_Transformed1() {
-        Forest forest = new Forest();
-        Leaf l1 = forest.addTree().addBranch().addLeaf();
-        Iterator<Object> it = new ObjectGraphIterator<Object>(forest, new LeafFinder());
+        final Forest forest = new Forest();
+        final Leaf l1 = forest.addTree().addBranch().addLeaf();
+        final Iterator<Object> it = new ObjectGraphIterator<Object>(forest, new LeafFinder());
 
         assertEquals(true, it.hasNext());
         assertSame(l1, it.next());
@@ -275,27 +275,27 @@ public class ObjectGraphIteratorTest ext
         try {
             it.next();
             fail();
-        } catch (NoSuchElementException ex) {
+        } catch (final NoSuchElementException ex) {
         }
     }
 
     public void testIteration_Transformed2() {
-        Forest forest = new Forest();
+        final Forest forest = new Forest();
         forest.addTree();
         forest.addTree();
         forest.addTree();
-        Branch b1 = forest.getTree(0).addBranch();
-        Branch b2 = forest.getTree(0).addBranch();
-        Branch b3 = forest.getTree(2).addBranch();
+        final Branch b1 = forest.getTree(0).addBranch();
+        final Branch b2 = forest.getTree(0).addBranch();
+        final Branch b3 = forest.getTree(2).addBranch();
         /* Branch b4 = */ forest.getTree(2).addBranch();
-        Branch b5 = forest.getTree(2).addBranch();
-        Leaf l1 = b1.addLeaf();
-        Leaf l2 = b1.addLeaf();
-        Leaf l3 = b2.addLeaf();
-        Leaf l4 = b3.addLeaf();
-        Leaf l5 = b5.addLeaf();
+        final Branch b5 = forest.getTree(2).addBranch();
+        final Leaf l1 = b1.addLeaf();
+        final Leaf l2 = b1.addLeaf();
+        final Leaf l3 = b2.addLeaf();
+        final Leaf l4 = b3.addLeaf();
+        final Leaf l5 = b5.addLeaf();
 
-        Iterator<Object> it = new ObjectGraphIterator<Object>(forest, new LeafFinder());
+        final Iterator<Object> it = new ObjectGraphIterator<Object>(forest, new LeafFinder());
 
         assertEquals(true, it.hasNext());
         assertSame(l1, it.next());
@@ -311,27 +311,27 @@ public class ObjectGraphIteratorTest ext
         try {
             it.next();
             fail();
-        } catch (NoSuchElementException ex) {
+        } catch (final NoSuchElementException ex) {
         }
     }
 
     public void testIteration_Transformed3() {
-        Forest forest = new Forest();
+        final Forest forest = new Forest();
         forest.addTree();
         forest.addTree();
         forest.addTree();
-        Branch b1 = forest.getTree(1).addBranch();
-        Branch b2 = forest.getTree(1).addBranch();
-        Branch b3 = forest.getTree(2).addBranch();
-        Branch b4 = forest.getTree(2).addBranch();
+        final Branch b1 = forest.getTree(1).addBranch();
+        final Branch b2 = forest.getTree(1).addBranch();
+        final Branch b3 = forest.getTree(2).addBranch();
+        final Branch b4 = forest.getTree(2).addBranch();
         /* Branch b5 = */ forest.getTree(2).addBranch();
-        Leaf l1 = b1.addLeaf();
-        Leaf l2 = b1.addLeaf();
-        Leaf l3 = b2.addLeaf();
-        Leaf l4 = b3.addLeaf();
-        Leaf l5 = b4.addLeaf();
+        final Leaf l1 = b1.addLeaf();
+        final Leaf l2 = b1.addLeaf();
+        final Leaf l3 = b2.addLeaf();
+        final Leaf l4 = b3.addLeaf();
+        final Leaf l5 = b4.addLeaf();
 
-        Iterator<Object> it = new ObjectGraphIterator<Object>(forest, new LeafFinder());
+        final Iterator<Object> it = new ObjectGraphIterator<Object>(forest, new LeafFinder());
 
         assertEquals(true, it.hasNext());
         assertSame(l1, it.next());
@@ -347,13 +347,13 @@ public class ObjectGraphIteratorTest ext
         try {
             it.next();
             fail();
-        } catch (NoSuchElementException ex) {
+        } catch (final NoSuchElementException ex) {
         }
     }
 
     //-----------------------------------------------------------------------
     static class LeafFinder implements Transformer<Object, Object> {
-        public Object transform(Object input) {
+        public Object transform(final Object input) {
             if (input instanceof Forest) {
                 return ((Forest) input).treeIterator();
             }
@@ -379,7 +379,7 @@ public class ObjectGraphIteratorTest ext
             return getTree(trees.size() - 1);
         }
 
-        Tree getTree(int index) {
+        Tree getTree(final int index) {
             return trees.get(index);
         }
 
@@ -396,7 +396,7 @@ public class ObjectGraphIteratorTest ext
             return getBranch(branches.size() - 1);
         }
 
-        Branch getBranch(int index) {
+        Branch getBranch(final int index) {
             return branches.get(index);
         }
 
@@ -413,7 +413,7 @@ public class ObjectGraphIteratorTest ext
             return getLeaf(leaves.size() - 1);
         }
 
-        Leaf getLeaf(int index) {
+        Leaf getLeaf(final int index) {
             return leaves.get(index);
         }
 
@@ -429,7 +429,7 @@ public class ObjectGraphIteratorTest ext
             return colour;
         }
 
-        void setColour(String colour) {
+        void setColour(final String colour) {
             this.colour = colour;
         }
     }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ReverseListIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ReverseListIteratorTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ReverseListIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ReverseListIteratorTest.java Mon Jan  7 17:15:14 2013
@@ -33,7 +33,7 @@ public class ReverseListIteratorTest<E> 
 
     protected String[] testArray = { "One", "Two", "Three", "Four" };
 
-    public ReverseListIteratorTest(String testName) {
+    public ReverseListIteratorTest(final String testName) {
         super(testName);
     }
 
@@ -45,7 +45,7 @@ public class ReverseListIteratorTest<E> 
     @Override
     @SuppressWarnings("unchecked")
     public ReverseListIterator<E> makeObject() {
-        List<E> list = new ArrayList<E>(Arrays.asList((E[]) testArray));
+        final List<E> list = new ArrayList<E>(Arrays.asList((E[]) testArray));
         return new ReverseListIterator<E>(list);
     }
 
@@ -53,7 +53,7 @@ public class ReverseListIteratorTest<E> 
     //-----------------------------------------------------------------------
     @Override
     public void testEmptyListIteratorIsIndeedEmpty() {
-        ListIterator<E> it = makeEmptyIterator();
+        final ListIterator<E> it = makeEmptyIterator();
 
         assertEquals(false, it.hasNext());
         assertEquals(-1, it.nextIndex());  // reversed index
@@ -64,21 +64,21 @@ public class ReverseListIteratorTest<E> 
         try {
             it.next();
             fail("NoSuchElementException must be thrown from empty ListIterator");
-        } catch (NoSuchElementException e) {
+        } catch (final NoSuchElementException e) {
         }
 
         // previous() should throw a NoSuchElementException
         try {
             it.previous();
             fail("NoSuchElementException must be thrown from empty ListIterator");
-        } catch (NoSuchElementException e) {
+        } catch (final NoSuchElementException e) {
         }
     }
 
     @Override
     public void testWalkForwardAndBack() {
-        ArrayList<E> list = new ArrayList<E>();
-        ListIterator<E> it = makeObject();
+        final ArrayList<E> list = new ArrayList<E>();
+        final ListIterator<E> it = makeObject();
         while (it.hasNext()) {
             list.add(it.next());
         }
@@ -101,7 +101,7 @@ public class ReverseListIteratorTest<E> 
             assertEquals("" + i, list.size() - i - 2, it.nextIndex());  // reversed index
             assertEquals(list.size() - i - 1, it.previousIndex());  // reversed index
 
-            Object obj = list.get(i);
+            final Object obj = list.get(i);
             assertEquals(obj, it.previous());
         }
 
@@ -111,13 +111,13 @@ public class ReverseListIteratorTest<E> 
         try {
             it.previous();
             fail("NoSuchElementException must be thrown from previous at start of ListIterator");
-        } catch (NoSuchElementException e) {
+        } catch (final NoSuchElementException e) {
         }
     }
 
     //-----------------------------------------------------------------------
     public void testReverse() {
-        ListIterator<E> it = makeObject();
+        final ListIterator<E> it = makeObject();
         assertEquals(true, it.hasNext());
         assertEquals(3, it.nextIndex());
         assertEquals(false, it.hasPrevious());
@@ -149,7 +149,7 @@ public class ReverseListIteratorTest<E> 
     }
 
     public void testReset() {
-        ResettableListIterator<E> it = makeObject();
+        final ResettableListIterator<E> it = makeObject();
         assertEquals("Four", it.next());
         it.reset();
         assertEquals("Four", it.next());

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonIterator2Test.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonIterator2Test.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonIterator2Test.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonIterator2Test.java Mon Jan  7 17:15:14 2013
@@ -31,7 +31,7 @@ public class SingletonIterator2Test<E> e
 
     private static final Object testValue = "foo";
 
-    public SingletonIterator2Test(String testName) {
+    public SingletonIterator2Test(final String testName) {
         super(testName);
     }
 
@@ -39,7 +39,7 @@ public class SingletonIterator2Test<E> e
     @Override
     @SuppressWarnings("unchecked")
     public SingletonIterator<E> makeEmptyIterator() {
-        SingletonIterator<E> iter = new SingletonIterator<E>((E) testValue);
+        final SingletonIterator<E> iter = new SingletonIterator<E>((E) testValue);
         iter.next();
         iter.remove();
         iter.reset();
@@ -64,17 +64,17 @@ public class SingletonIterator2Test<E> e
 
     //-----------------------------------------------------------------------
     public void testIterator() {
-        Iterator<E> iter = makeObject();
+        final Iterator<E> iter = makeObject();
         assertTrue("Iterator has a first item", iter.hasNext());
 
-        E iterValue = iter.next();
+        final E iterValue = iter.next();
         assertEquals("Iteration value is correct", testValue, iterValue);
 
         assertTrue("Iterator should now be empty", !iter.hasNext());
 
         try {
             iter.next();
-        } catch (Exception e) {
+        } catch (final Exception e) {
             assertTrue(
                 "NoSuchElementException must be thrown",
                 e.getClass().equals(new NoSuchElementException().getClass()));
@@ -82,7 +82,7 @@ public class SingletonIterator2Test<E> e
     }
 
     public void testReset() {
-        ResettableIterator<E> it = makeObject();
+        final ResettableIterator<E> it = makeObject();
 
         assertEquals(true, it.hasNext());
         assertEquals(testValue, it.next());

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonIteratorTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonIteratorTest.java Mon Jan  7 17:15:14 2013
@@ -31,7 +31,7 @@ public class SingletonIteratorTest<E> ex
 
     private static final Object testValue = "foo";
 
-    public SingletonIteratorTest(String testName) {
+    public SingletonIteratorTest(final String testName) {
         super(testName);
     }
 
@@ -41,7 +41,7 @@ public class SingletonIteratorTest<E> ex
      */
     @Override
     public SingletonIterator<E> makeEmptyIterator() {
-        SingletonIterator<E> iter = makeObject();
+        final SingletonIterator<E> iter = makeObject();
         iter.next();
         iter.remove();
         iter.reset();
@@ -65,17 +65,17 @@ public class SingletonIteratorTest<E> ex
     }
 
     public void testIterator() {
-        Iterator<E> iter = makeObject();
+        final Iterator<E> iter = makeObject();
         assertTrue("Iterator has a first item", iter.hasNext());
 
-        E iterValue = iter.next();
+        final E iterValue = iter.next();
         assertEquals("Iteration value is correct", testValue, iterValue);
 
         assertTrue("Iterator should now be empty", !iter.hasNext());
 
         try {
             iter.next();
-        } catch (Exception e) {
+        } catch (final Exception e) {
             assertTrue(
                 "NoSuchElementException must be thrown",
                 e.getClass().equals(new NoSuchElementException().getClass()));
@@ -84,7 +84,7 @@ public class SingletonIteratorTest<E> ex
 
     @SuppressWarnings("unchecked")
     public void testSingletonIteratorRemove() {
-        ResettableIterator<E> iter = new SingletonIterator<E>((E) "xyzzy");
+        final ResettableIterator<E> iter = new SingletonIterator<E>((E) "xyzzy");
         assertTrue(iter.hasNext());
         assertEquals("xyzzy",iter.next());
         iter.remove();
@@ -93,7 +93,7 @@ public class SingletonIteratorTest<E> ex
     }
 
     public void testReset() {
-        ResettableIterator<E> it = makeObject();
+        final ResettableIterator<E> it = makeObject();
 
         assertEquals(true, it.hasNext());
         assertEquals(testValue, it.next());

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonListIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonListIteratorTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonListIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/SingletonListIteratorTest.java Mon Jan  7 17:15:14 2013
@@ -30,7 +30,7 @@ public class SingletonListIteratorTest<E
 
     private static final Object testValue = "foo";
     
-    public SingletonListIteratorTest(String testName) {
+    public SingletonListIteratorTest(final String testName) {
         super(testName);
     }
     
@@ -40,7 +40,7 @@ public class SingletonListIteratorTest<E
      */
     @Override
     public SingletonListIterator<E> makeEmptyIterator() {
-        SingletonListIterator<E> iter = makeObject();
+        final SingletonListIterator<E> iter = makeObject();
         iter.next();
         iter.remove();
         iter.reset();        
@@ -69,7 +69,7 @@ public class SingletonListIteratorTest<E
     }
 
     public void testIterator() {
-        ListIterator<E> iter = makeObject();
+        final ListIterator<E> iter = makeObject();
         assertTrue( "Iterator should have next item", iter.hasNext() );
         assertTrue( "Iterator should have no previous item", !iter.hasPrevious() );
         assertEquals( "Iteration next index", 0, iter.nextIndex() );
@@ -101,21 +101,21 @@ public class SingletonListIteratorTest<E
 
         try {
             iter.next();
-        } catch (Exception e) {
+        } catch (final Exception e) {
           assertTrue("NoSuchElementException must be thrown", 
              e.getClass().equals(new NoSuchElementException().getClass()));
         }
         iter.previous();
         try {
             iter.previous();
-        } catch (Exception e) {
+        } catch (final Exception e) {
           assertTrue("NoSuchElementException must be thrown", 
              e.getClass().equals(new NoSuchElementException().getClass()));
         }
     }
     
     public void testReset() {
-        ResettableListIterator<E> it = makeObject();
+        final ResettableListIterator<E> it = makeObject();
         
         assertEquals(true, it.hasNext());
         assertEquals(false, it.hasPrevious());

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/UniqueFilterIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/UniqueFilterIteratorTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/UniqueFilterIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/UniqueFilterIteratorTest.java Mon Jan  7 17:15:14 2013
@@ -34,7 +34,7 @@ public class UniqueFilterIteratorTest<E>
 
     protected List<E> list1 = null;
 
-    public UniqueFilterIteratorTest(String testName) {
+    public UniqueFilterIteratorTest(final String testName) {
         super(testName);
     }
 
@@ -56,20 +56,20 @@ public class UniqueFilterIteratorTest<E>
 
     @Override
     public UniqueFilterIterator<E> makeEmptyIterator() {
-        ArrayList<E> list = new ArrayList<E>();
+        final ArrayList<E> list = new ArrayList<E>();
         return new UniqueFilterIterator<E>(list.iterator());
     }
 
     @Override
     public UniqueFilterIterator<E> makeObject() {
-        Iterator<E> i = list1.iterator();
+        final Iterator<E> i = list1.iterator();
         return new UniqueFilterIterator<E>(i);
     }
 
     public void testIterator() {
-        Iterator<E> iter = makeObject();
-        for (String testValue : testArray) {
-            E iterValue = iter.next();
+        final Iterator<E> iter = makeObject();
+        for (final String testValue : testArray) {
+            final E iterValue = iter.next();
 
             assertEquals( "Iteration value is correct", testValue, iterValue );
         }
@@ -78,7 +78,7 @@ public class UniqueFilterIteratorTest<E>
 
         try {
             iter.next();
-        } catch (Exception e) {
+        } catch (final Exception e) {
             assertTrue("NoSuchElementException must be thrown", 
                        e.getClass().equals(new NoSuchElementException().getClass()));
         }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/UnmodifiableIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/UnmodifiableIteratorTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/UnmodifiableIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/UnmodifiableIteratorTest.java Mon Jan  7 17:15:14 2013
@@ -34,7 +34,7 @@ public class UnmodifiableIteratorTest<E>
     protected String[] testArray = { "One", "Two", "Three" };
     protected List<E> testList;
 
-    public UnmodifiableIteratorTest(String testName) {
+    public UnmodifiableIteratorTest(final String testName) {
         super(testName);
     }
 
@@ -78,7 +78,7 @@ public class UnmodifiableIteratorTest<E>
         try {
             UnmodifiableIterator.unmodifiableIterator(null);
             fail();
-        } catch (IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {}
     }
 
 }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/UnmodifiableListIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/UnmodifiableListIteratorTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/UnmodifiableListIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/UnmodifiableListIteratorTest.java Mon Jan  7 17:15:14 2013
@@ -34,7 +34,7 @@ public class UnmodifiableListIteratorTes
     protected String[] testArray = { "One", "Two", "Three" };
     protected List<E> testList;
 
-    public UnmodifiableListIteratorTest(String testName) {
+    public UnmodifiableListIteratorTest(final String testName) {
         super(testName);
     }
 
@@ -88,7 +88,7 @@ public class UnmodifiableListIteratorTes
         try {
             UnmodifiableListIterator.umodifiableListIterator(null);
             fail();
-        } catch (IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {}
     }
 
 }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/UnmodifiableMapIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/UnmodifiableMapIteratorTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/UnmodifiableMapIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/UnmodifiableMapIteratorTest.java Mon Jan  7 17:15:14 2013
@@ -31,7 +31,7 @@ import org.apache.commons.collections.bi
  */
 public class UnmodifiableMapIteratorTest<K, V> extends AbstractMapIteratorTest<K, V> {
 
-    public UnmodifiableMapIteratorTest(String testName) {
+    public UnmodifiableMapIteratorTest(final String testName) {
         super(testName);
     }
 
@@ -48,7 +48,7 @@ public class UnmodifiableMapIteratorTest
     @Override
     @SuppressWarnings("unchecked")
     public IterableMap<K, V> getMap() {
-        IterableMap<K, V> testMap = new DualHashBidiMap<K, V>();
+        final IterableMap<K, V> testMap = new DualHashBidiMap<K, V>();
         testMap.put((K) "A", (V) "a");
         testMap.put((K) "B", (V)"b");
         testMap.put((K) "C", (V) "c");
@@ -58,7 +58,7 @@ public class UnmodifiableMapIteratorTest
     @Override
     @SuppressWarnings("unchecked")
     public Map<K, V> getConfirmedMap() {
-        Map<K, V> testMap = new HashMap<K, V>();
+        final Map<K, V> testMap = new HashMap<K, V>();
         testMap.put((K) "A", (V) "a");
         testMap.put((K) "B", (V)"b");
         testMap.put((K) "C", (V) "c");
@@ -90,7 +90,7 @@ public class UnmodifiableMapIteratorTest
         try {
             UnmodifiableMapIterator.unmodifiableMapIterator(null);
             fail();
-        } catch (IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {}
     }
 
 }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/UnmodifiableOrderedMapIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/UnmodifiableOrderedMapIteratorTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/UnmodifiableOrderedMapIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/UnmodifiableOrderedMapIteratorTest.java Mon Jan  7 17:15:14 2013
@@ -32,7 +32,7 @@ import org.apache.commons.collections.ma
  */
 public class UnmodifiableOrderedMapIteratorTest<K, V> extends AbstractOrderedMapIteratorTest<K, V> {
 
-    public UnmodifiableOrderedMapIteratorTest(String testName) {
+    public UnmodifiableOrderedMapIteratorTest(final String testName) {
         super(testName);
     }
 
@@ -50,7 +50,7 @@ public class UnmodifiableOrderedMapItera
     @Override
     @SuppressWarnings("unchecked")
     public OrderedMap<K, V> getMap() {
-        OrderedMap<K, V> testMap = ListOrderedMap.listOrderedMap(new HashMap<K, V>());
+        final OrderedMap<K, V> testMap = ListOrderedMap.listOrderedMap(new HashMap<K, V>());
         testMap.put((K) "A", (V) "a");
         testMap.put((K) "B", (V) "b");
         testMap.put((K) "C", (V) "c");
@@ -60,7 +60,7 @@ public class UnmodifiableOrderedMapItera
     @Override
     @SuppressWarnings("unchecked")
     public Map<K, V> getConfirmedMap() {
-        Map<K, V> testMap = new TreeMap<K, V>();
+        final Map<K, V> testMap = new TreeMap<K, V>();
         testMap.put((K) "A", (V) "a");
         testMap.put((K) "B", (V) "b");
         testMap.put((K) "C", (V) "c");
@@ -92,7 +92,7 @@ public class UnmodifiableOrderedMapItera
         try {
             UnmodifiableOrderedMapIterator.unmodifiableOrderedMapIterator(null);
             fail();
-        } catch (IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {}
     }
 
 }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/keyvalue/AbstractMapEntryTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/keyvalue/AbstractMapEntryTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/keyvalue/AbstractMapEntryTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/keyvalue/AbstractMapEntryTest.java Mon Jan  7 17:15:14 2013
@@ -41,7 +41,7 @@ public abstract class AbstractMapEntryTe
      * 
      * @param testName  the test name
      */
-    public AbstractMapEntryTest(String testName) {
+    public AbstractMapEntryTest(final String testName) {
         super(testName);
     }
 
@@ -72,10 +72,10 @@ public abstract class AbstractMapEntryTe
     /**
      * Makes a Map.Entry of a type that's known to work correctly.
      */
-    public Map.Entry<K, V> makeKnownMapEntry(K key, V value) {
-        Map<K, V> map = new HashMap<K, V>(1);
+    public Map.Entry<K, V> makeKnownMapEntry(final K key, final V value) {
+        final Map<K, V> map = new HashMap<K, V>(1);
         map.put(key, value);
-        Map.Entry<K, V> entry = map.entrySet().iterator().next();
+        final Map.Entry<K, V> entry = map.entrySet().iterator().next();
         return entry;
     }
 
@@ -110,12 +110,12 @@ public abstract class AbstractMapEntryTe
         //  the MapEntry to contain itself (and thus cause infinite recursion
         //  in #hashCode and #toString)
 
-        Map.Entry<K, V> entry = makeMapEntry();
+        final Map.Entry<K, V> entry = makeMapEntry();
 
         try {
             entry.setValue((V) entry);
             fail("Should throw an IllegalArgumentException");
-        } catch (IllegalArgumentException iae) {
+        } catch (final IllegalArgumentException iae) {
             // expected to happen...
 
             // check that the KVP's state has not changed

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/keyvalue/DefaultKeyValueTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/keyvalue/DefaultKeyValueTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/keyvalue/DefaultKeyValueTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/keyvalue/DefaultKeyValueTest.java Mon Jan  7 17:15:14 2013
@@ -37,7 +37,7 @@ public class DefaultKeyValueTest<K, V> e
      * 
      * @param testName  the test name
      */
-    public DefaultKeyValueTest(String testName) {
+    public DefaultKeyValueTest(final String testName) {
         super(testName);
 
     }
@@ -57,14 +57,14 @@ public class DefaultKeyValueTest<K, V> e
      * Subclasses should override this method to return a DefaultKeyValue
      * of the type being tested.
      */
-    protected DefaultKeyValue<K, V> makeDefaultKeyValue(K key, V value) {
+    protected DefaultKeyValue<K, V> makeDefaultKeyValue(final K key, final V value) {
         return new DefaultKeyValue<K, V>(key, value);
     }
 
     //-----------------------------------------------------------------------
     @SuppressWarnings("unchecked")
     public void testAccessorsAndMutators() {
-        DefaultKeyValue<K, V> kv = makeDefaultKeyValue();
+        final DefaultKeyValue<K, V> kv = makeDefaultKeyValue();
 
         kv.setKey((K) key);
         assertTrue(kv.getKey() == key);
@@ -87,12 +87,12 @@ public class DefaultKeyValueTest<K, V> e
         //  the KVP to contain itself (and thus cause infinite recursion
         //  in #hashCode and #toString)
 
-        DefaultKeyValue<K, V> kv = makeDefaultKeyValue();
+        final DefaultKeyValue<K, V> kv = makeDefaultKeyValue();
 
         try {
             kv.setKey((K) kv);
             fail("Should throw an IllegalArgumentException");
-        } catch (IllegalArgumentException iae) {
+        } catch (final IllegalArgumentException iae) {
             // expected to happen...
 
             // check that the KVP's state has not changed
@@ -102,7 +102,7 @@ public class DefaultKeyValueTest<K, V> e
         try {
             kv.setValue((V) kv);
             fail("Should throw an IllegalArgumentException");
-        } catch (IllegalArgumentException iae) {
+        } catch (final IllegalArgumentException iae) {
             // expected to happen...
 
             // check that the KVP's state has not changed
@@ -124,7 +124,7 @@ public class DefaultKeyValueTest<K, V> e
         assertTrue(kv.getKey() == key && kv.getValue() == value);
 
         // 3. test copy constructor
-        DefaultKeyValue<K, V> kv2 = new DefaultKeyValue<K, V>(kv);
+        final DefaultKeyValue<K, V> kv2 = new DefaultKeyValue<K, V>(kv);
         assertTrue(kv2.getKey() == key && kv2.getValue() == value);
 
         // test that the KVPs are independent
@@ -134,9 +134,9 @@ public class DefaultKeyValueTest<K, V> e
         assertTrue(kv2.getKey() == key && kv2.getValue() == value);
 
         // 4. test Map.Entry constructor
-        Map<K, V> map = new HashMap<K, V>();
+        final Map<K, V> map = new HashMap<K, V>();
         map.put((K) key, (V) value);
-        Map.Entry<K, V> entry = map.entrySet().iterator().next();
+        final Map.Entry<K, V> entry = map.entrySet().iterator().next();
 
         kv = new DefaultKeyValue<K, V>(entry);
         assertTrue(kv.getKey() == key && kv.getValue() == value);
@@ -178,11 +178,11 @@ public class DefaultKeyValueTest<K, V> e
 
     @SuppressWarnings("unchecked")
     public void testToMapEntry() {
-        DefaultKeyValue<K, V> kv = makeDefaultKeyValue((K) key, (V) value);
+        final DefaultKeyValue<K, V> kv = makeDefaultKeyValue((K) key, (V) value);
 
-        Map<K, V> map = new HashMap<K, V>();
+        final Map<K, V> map = new HashMap<K, V>();
         map.put(kv.getKey(), kv.getValue());
-        Map.Entry<K, V> entry = map.entrySet().iterator().next();
+        final Map.Entry<K, V> entry = map.entrySet().iterator().next();
 
         assertTrue(entry.equals(kv.toMapEntry()));
         assertTrue(entry.hashCode() == kv.hashCode());

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/keyvalue/DefaultMapEntryTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/keyvalue/DefaultMapEntryTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/keyvalue/DefaultMapEntryTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/keyvalue/DefaultMapEntryTest.java Mon Jan  7 17:15:14 2013
@@ -28,7 +28,7 @@ import org.apache.commons.collections.Ke
  */
 public class DefaultMapEntryTest<K, V> extends AbstractMapEntryTest<K, V> {
 
-    public DefaultMapEntryTest(String testName) {
+    public DefaultMapEntryTest(final String testName) {
         super(testName);
     }
 
@@ -49,7 +49,7 @@ public class DefaultMapEntryTest<K, V> e
      * of the type being tested.
      */
     @Override
-    public Map.Entry<K, V> makeMapEntry(K key, V value) {
+    public Map.Entry<K, V> makeMapEntry(final K key, final V value) {
         return new DefaultMapEntry<K, V>(key, value);
     }
 
@@ -62,17 +62,17 @@ public class DefaultMapEntryTest<K, V> e
     @SuppressWarnings("unchecked")
     public void testConstructors() {
         // 1. test key-value constructor
-        Map.Entry<K, V> entry = new DefaultMapEntry<K, V>((K) key, (V) value);
+        final Map.Entry<K, V> entry = new DefaultMapEntry<K, V>((K) key, (V) value);
         assertSame(key, entry.getKey());
         assertSame(value, entry.getValue());
 
         // 2. test pair constructor
-        KeyValue<K, V> pair = new DefaultKeyValue<K, V>((K) key, (V) value);
+        final KeyValue<K, V> pair = new DefaultKeyValue<K, V>((K) key, (V) value);
         assertSame(key, pair.getKey());
         assertSame(value, pair.getValue());
 
         // 3. test copy constructor
-        Map.Entry<K, V> entry2 = new DefaultMapEntry<K, V>(entry);
+        final Map.Entry<K, V> entry2 = new DefaultMapEntry<K, V>(entry);
         assertSame(key, entry2.getKey());
         assertSame(value, entry2.getValue());
 
@@ -84,13 +84,13 @@ public class DefaultMapEntryTest<K, V> e
     @Override
     @SuppressWarnings("unchecked")
     public void testSelfReferenceHandling() {
-        Map.Entry<K, V> entry = makeMapEntry();
+        final Map.Entry<K, V> entry = makeMapEntry();
 
         try {
             entry.setValue((V) entry);
             assertSame(entry, entry.getValue());
 
-        } catch (Exception e) {
+        } catch (final Exception e) {
             fail("This Map.Entry implementation supports value self-reference.");
         }
     }



Mime
View raw message