commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1429905 [17/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/SplitMapUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/SplitMapUtilsTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/SplitMapUtilsTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/SplitMapUtilsTest.java Mon Jan  7 17:15:14 2013
@@ -34,13 +34,13 @@ public class SplitMapUtilsTest extends B
     private Map<String, Integer> backingMap;
     private TransformedMap<String, String, String, Integer> transformedMap;
 
-    private Transformer<String, Integer> stringToInt = new Transformer<String, Integer>() {
-        public Integer transform(String input) {
+    private final Transformer<String, Integer> stringToInt = new Transformer<String, Integer>() {
+        public Integer transform(final String input) {
             return Integer.valueOf(input);
         }
     };
 
-    public SplitMapUtilsTest(String testName) {
+    public SplitMapUtilsTest(final String testName) {
         super(testName);
     }
 
@@ -67,9 +67,9 @@ public class SplitMapUtilsTest extends B
         }
 
         // mapIterator
-        MapIterator<String, Integer> it = map.mapIterator();
+        final MapIterator<String, Integer> it = map.mapIterator();
         while (it.hasNext()) {
-            String k = it.next();
+            final String k = it.next();
             assertEquals(k, it.getKey());
             assertEquals(Integer.valueOf(k), it.getValue());
         }
@@ -105,7 +105,7 @@ public class SplitMapUtilsTest extends B
         });
 
         // equals, hashcode
-        IterableMap<String, Integer> other = SplitMapUtils.readableMap(transformedMap);
+        final IterableMap<String, Integer> other = SplitMapUtils.readableMap(transformedMap);
         assertEquals(other, map);
         assertEquals(other.hashCode(), map.hashCode());
 
@@ -119,7 +119,7 @@ public class SplitMapUtilsTest extends B
     }
 
     public void testAlreadyReadableMap() {
-        HashedMap<String, Integer> hashedMap = new HashedMap<String, Integer>();
+        final HashedMap<String, Integer> hashedMap = new HashedMap<String, Integer>();
         assertSame(hashedMap, SplitMapUtils.readableMap(hashedMap));
     }
 
@@ -173,7 +173,7 @@ public class SplitMapUtilsTest extends B
         });
 
         // equals, hashcode
-        Map<String, String> other = SplitMapUtils.writableMap(transformedMap);
+        final Map<String, String> other = SplitMapUtils.writableMap(transformedMap);
         assertEquals(other, map);
         assertEquals(other.hashCode(), map.hashCode());
 
@@ -184,7 +184,7 @@ public class SplitMapUtilsTest extends B
         assertEquals(++sz, backingMap.size());
 
         // putall
-        Map<String, String> more = new HashMap<String, String>();
+        final Map<String, String> more = new HashMap<String, String>();
         more.put("foo", "77");
         more.put("bar", "88");
         more.put("baz", "99");
@@ -198,23 +198,23 @@ public class SplitMapUtilsTest extends B
     }
 
     public void testAlreadyWritableMap() {
-        HashedMap<String, String> hashedMap = new HashedMap<String, String>();
+        final HashedMap<String, String> hashedMap = new HashedMap<String, String>();
         assertSame(hashedMap, SplitMapUtils.writableMap(hashedMap));
     }
 
-    private void attemptGetOperation(Runnable r) {
+    private void attemptGetOperation(final Runnable r) {
         attemptMapOperation("Put exposed as writable Map must not allow Get operations", r);
     }
 
-    private void attemptPutOperation(Runnable r) {
+    private void attemptPutOperation(final Runnable r) {
         attemptMapOperation("Get exposed as writable Map must not allow Put operations", r);
     }
 
-    private void attemptMapOperation(String s, Runnable r) {
+    private void attemptMapOperation(final String s, final Runnable r) {
         try {
             r.run();
             fail(s);
-        } catch (UnsupportedOperationException e) {
+        } catch (final UnsupportedOperationException e) {
         }
     }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/TestUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/TestUtils.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/TestUtils.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/TestUtils.java Mon Jan  7 17:15:14 2013
@@ -27,7 +27,7 @@ public final class TestUtils {
      * @param o object that will be tested.
      * @see #assertSameAfterSerialization(Object)
      */
-    public static void assertSameAfterSerialization(String msg, Object o) {
+    public static void assertSameAfterSerialization(final String msg, final Object o) {
         try {
             // write object to byte buffer
             final ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -43,10 +43,10 @@ public final class TestUtils {
 
             // assert that original object and deserialized objects are the same
             assertSame(msg, o, object);
-        } catch (IOException e) {
+        } catch (final IOException e) {
             // should never happen
             throw new RuntimeException(e);
-        } catch (ClassNotFoundException e) {
+        } catch (final ClassNotFoundException e) {
             // should never happen
             throw new RuntimeException(e);
         }
@@ -62,7 +62,7 @@ public final class TestUtils {
      * @param o object that will be tested.
      * @see #assertSameAfterSerialization(String, Object)
      */
-    public static void assertSameAfterSerialization(Object o) {
+    public static void assertSameAfterSerialization(final Object o) {
         assertSameAfterSerialization(null, o);
     }
 }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/TransformerUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/TransformerUtilsTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/TransformerUtilsTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/TransformerUtilsTest.java Mon Jan  7 17:15:14 2013
@@ -51,7 +51,7 @@ public class TransformerUtilsTest extend
     /**
      * Construct
      */
-    public TransformerUtilsTest(String name) {
+    public TransformerUtilsTest(final String name) {
         super(name);
     }
 
@@ -77,10 +77,10 @@ public class TransformerUtilsTest extend
         assertSame(TransformerUtils.exceptionTransformer(), TransformerUtils.exceptionTransformer());
         try {
             TransformerUtils.exceptionTransformer().transform(null);
-        } catch (FunctorException ex) {
+        } catch (final FunctorException ex) {
             try {
                 TransformerUtils.exceptionTransformer().transform(cString);
-            } catch (FunctorException ex2) {
+            } catch (final FunctorException ex2) {
                 return;
             }
         }
@@ -131,7 +131,7 @@ public class TransformerUtilsTest extend
         assertEquals(cInteger, TransformerUtils.cloneTransformer().transform(cInteger));
         try {
             assertEquals(cObject, TransformerUtils.cloneTransformer().transform(cObject));
-        } catch (IllegalArgumentException ex) {
+        } catch (final IllegalArgumentException ex) {
             return;
         }
         fail();
@@ -141,7 +141,7 @@ public class TransformerUtilsTest extend
     //------------------------------------------------------------------
 
     public void testMapTransformer() {
-        Map<Object, Integer> map = new HashMap<Object, Integer>();
+        final Map<Object, Integer> map = new HashMap<Object, Integer>();
         map.put(null, 0);
         map.put(cObject, 1);
         map.put(cString, 2);
@@ -162,7 +162,7 @@ public class TransformerUtilsTest extend
         assertEquals(cInteger, TransformerUtils.asTransformer(ClosureUtils.nopClosure()).transform(cInteger));
         try {
             TransformerUtils.asTransformer((Closure<Object>) null);
-        } catch (IllegalArgumentException ex) {
+        } catch (final IllegalArgumentException ex) {
             return;
         }
         fail();
@@ -178,7 +178,7 @@ public class TransformerUtilsTest extend
         assertEquals(Boolean.TRUE, TransformerUtils.asTransformer(TruePredicate.truePredicate()).transform(cInteger));
         try {
             TransformerUtils.asTransformer((Predicate<Object>) null);
-        } catch (IllegalArgumentException ex) {
+        } catch (final IllegalArgumentException ex) {
             return;
         }
         fail();
@@ -194,7 +194,7 @@ public class TransformerUtilsTest extend
         assertEquals(null, TransformerUtils.asTransformer(FactoryUtils.nullFactory()).transform(cInteger));
         try {
             TransformerUtils.asTransformer((Factory<Object>) null);
-        } catch (IllegalArgumentException ex) {
+        } catch (final IllegalArgumentException ex) {
             return;
         }
         fail();
@@ -205,8 +205,8 @@ public class TransformerUtilsTest extend
 
     @SuppressWarnings("unchecked")
     public void testChainedTransformer() {
-        Transformer<Object, Object> a = TransformerUtils.<Object, Object>constantTransformer("A");
-        Transformer<Object, Object> b = TransformerUtils.constantTransformer((Object) "B");
+        final Transformer<Object, Object> a = TransformerUtils.<Object, Object>constantTransformer("A");
+        final Transformer<Object, Object> b = TransformerUtils.constantTransformer((Object) "B");
 
         assertEquals("A", TransformerUtils.chainedTransformer(b, a).transform(null));
         assertEquals("B", TransformerUtils.chainedTransformer(a, b).transform(null));
@@ -222,26 +222,26 @@ public class TransformerUtilsTest extend
         try {
             TransformerUtils.chainedTransformer(null, null);
             fail();
-        } catch (IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {}
         try {
             TransformerUtils.chainedTransformer((Transformer[]) null);
             fail();
-        } catch (IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {}
         try {
             TransformerUtils.chainedTransformer((Collection<Transformer<Object, Object>>) null);
             fail();
-        } catch (IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {}
         try {
             TransformerUtils.chainedTransformer(new Transformer[] {null, null});
             fail();
-        } catch (IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {}
         try {
             coll = new ArrayList<Transformer<Object, Object>>();
             coll.add(null);
             coll.add(null);
             TransformerUtils.chainedTransformer(coll);
             fail();
-        } catch (IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {}
     }
 
     // switchTransformer
@@ -249,9 +249,9 @@ public class TransformerUtilsTest extend
 
     @SuppressWarnings("unchecked")
     public void testSwitchTransformer() {
-        Transformer<String, String> a = TransformerUtils.constantTransformer("A");
-        Transformer<String, String> b = TransformerUtils.constantTransformer("B");
-        Transformer<String, String> c = TransformerUtils.constantTransformer("C");
+        final Transformer<String, String> a = TransformerUtils.constantTransformer("A");
+        final Transformer<String, String> b = TransformerUtils.constantTransformer("B");
+        final Transformer<String, String> c = TransformerUtils.constantTransformer("C");
 
         assertEquals("A", TransformerUtils.switchTransformer(TruePredicate.truePredicate(), a, b).transform(null));
         assertEquals("B", TransformerUtils.switchTransformer(FalsePredicate.falsePredicate(), a, b).transform(null));
@@ -288,34 +288,34 @@ public class TransformerUtilsTest extend
         try {
             TransformerUtils.switchTransformer(null, null);
             fail();
-        } catch (IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {}
         try {
             TransformerUtils.switchTransformer((Predicate[]) null, (Transformer[]) null);
             fail();
-        } catch (IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {}
         try {
             TransformerUtils.switchTransformer((Map<Predicate<Object>, Transformer<Object, Object>>) null);
             fail();
-        } catch (IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {}
         try {
             TransformerUtils.switchTransformer(new Predicate[2], new Transformer[2]);
             fail();
-        } catch (IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {}
         try {
             TransformerUtils.switchTransformer(
                     new Predicate[] { TruePredicate.truePredicate() },
                     new Transformer[] { a, b });
             fail();
-        } catch (IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {}
     }
 
     // switchMapTransformer
     //------------------------------------------------------------------
 
     public void testSwitchMapTransformer() {
-        Transformer<String, String> a = TransformerUtils.constantTransformer("A");
-        Transformer<String, String> b = TransformerUtils.constantTransformer("B");
-        Transformer<String, String> c = TransformerUtils.constantTransformer("C");
+        final Transformer<String, String> a = TransformerUtils.constantTransformer("A");
+        final Transformer<String, String> b = TransformerUtils.constantTransformer("B");
+        final Transformer<String, String> c = TransformerUtils.constantTransformer("C");
 
         Map<String, Transformer<String, String>> map = new HashMap<String, Transformer<String,String>>();
         map.put("HELLO", a);
@@ -334,14 +334,14 @@ public class TransformerUtilsTest extend
         try {
             TransformerUtils.switchMapTransformer(null);
             fail();
-        } catch (IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {}
     }
 
     // invokerTransformer
     //------------------------------------------------------------------
 
     public void testInvokerTransformer() {
-        List<Object> list = new ArrayList<Object>();
+        final List<Object> list = new ArrayList<Object>();
         assertEquals(new Integer(0), TransformerUtils.invokerTransformer("size").transform(list));
         list.add(new Object());
         assertEquals(new Integer(1), TransformerUtils.invokerTransformer("size").transform(list));
@@ -350,18 +350,18 @@ public class TransformerUtilsTest extend
         try {
             TransformerUtils.invokerTransformer(null);
             fail();
-        } catch (IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {}
         try {
             TransformerUtils.invokerTransformer("noSuchMethod").transform(new Object());
             fail();
-        } catch (FunctorException ex) {}
+        } catch (final FunctorException ex) {}
     }
 
     // invokerTransformer2
     //------------------------------------------------------------------
 
     public void testInvokerTransformer2() {
-        List<Object> list = new ArrayList<Object>();
+        final List<Object> list = new ArrayList<Object>();
         assertEquals(Boolean.FALSE, TransformerUtils.invokerTransformer("contains",
                 new Class[] { Object.class }, new Object[] { cString }).transform(list));
         list.add(cString);
@@ -373,24 +373,24 @@ public class TransformerUtilsTest extend
         try {
             TransformerUtils.invokerTransformer(null, null, null);
             fail();
-        } catch (IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {}
         try {
             TransformerUtils.invokerTransformer("noSuchMethod", new Class[] { Object.class },
                     new Object[] { cString }).transform(new Object());
             fail();
-        } catch (FunctorException ex) {}
+        } catch (final FunctorException ex) {}
         try {
             TransformerUtils.invokerTransformer("badArgs", null, new Object[] { cString });
             fail();
-        } catch (IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {}
         try {
             TransformerUtils.invokerTransformer("badArgs", new Class[] { Object.class }, null);
             fail();
-        } catch (IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {}
         try {
             TransformerUtils.invokerTransformer("badArgs", new Class[] {}, new Object[] { cString });
             fail();
-        } catch (IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {}
     }
 
     // stringValueTransformer
@@ -412,17 +412,17 @@ public class TransformerUtilsTest extend
         try {
             TransformerUtils.instantiateTransformer(null, new Object[] { "str" });
             fail();
-        } catch (IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {}
         try {
             TransformerUtils.instantiateTransformer(new Class[] {}, new Object[] { "str" });
             fail();
-        } catch (IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {}
 
         Transformer<Class<?>, Object> trans = TransformerUtils.instantiateTransformer(new Class[] { Long.class }, new Object[] { null });
         try {
             trans.transform(String.class);
             fail();
-        } catch (FunctorException ex) {}
+        } catch (final FunctorException ex) {}
 
         trans = TransformerUtils.instantiateTransformer();
         assertEquals("", trans.transform(String.class));

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/AbstractBagTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/AbstractBagTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/AbstractBagTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/AbstractBagTest.java Mon Jan  7 17:15:14 2013
@@ -50,7 +50,7 @@ public abstract class AbstractBagTest<T>
      * 
      * @param testName  the test class name
      */
-    public AbstractBagTest(String testName) {
+    public AbstractBagTest(final String testName) {
         super(testName);
     }
 
@@ -66,7 +66,7 @@ public abstract class AbstractBagTest<T>
     //-----------------------------------------------------------------------
     @SuppressWarnings("unchecked")
     public void testBagAdd() {
-        Bag<T> bag = makeObject();
+        final Bag<T> bag = makeObject();
         bag.add((T) "A");
         assertTrue("Should contain 'A'", bag.contains("A"));
         assertEquals("Should have count of 1", 1, bag.getCount("A"));
@@ -80,7 +80,7 @@ public abstract class AbstractBagTest<T>
 
     @SuppressWarnings("unchecked")
     public void testBagEqualsSelf() {
-        Bag<T> bag = makeObject();
+        final Bag<T> bag = makeObject();
         assertTrue(bag.equals(bag));
         bag.add((T) "elt");
         assertTrue(bag.equals(bag));
@@ -92,7 +92,7 @@ public abstract class AbstractBagTest<T>
 
     @SuppressWarnings("unchecked")
     public void testRemove() {
-        Bag<T> bag = makeObject();
+        final Bag<T> bag = makeObject();
         bag.add((T) "A");
         assertEquals("Should have count of 1", 1, bag.getCount("A"));
         bag.remove("A");
@@ -112,13 +112,13 @@ public abstract class AbstractBagTest<T>
 
     @SuppressWarnings("unchecked")
     public void testRemoveAll() {
-        Bag<T> bag = makeObject();
+        final Bag<T> bag = makeObject();
         bag.add((T) "A", 2);
         assertEquals("Should have count of 2", 2, bag.getCount("A"));
         bag.add((T) "B");
         bag.add((T) "C");
         assertEquals("Should have count of 4", 4, bag.size());
-        List<String> delete = new ArrayList<String>();
+        final List<String> delete = new ArrayList<String>();
         delete.add("A");
         delete.add("B");
         bag.removeAll(delete);
@@ -130,7 +130,7 @@ public abstract class AbstractBagTest<T>
     
     @SuppressWarnings("unchecked")
     public void testContains() {
-        Bag<T> bag = makeObject();
+        final Bag<T> bag = makeObject();
         
         assertEquals("Bag does not have at least 1 'A'", false, bag.contains("A"));
         assertEquals("Bag does not have at least 1 'B'", false, bag.contains("B"));
@@ -150,16 +150,16 @@ public abstract class AbstractBagTest<T>
 
     @SuppressWarnings("unchecked")
     public void testContainsAll() {
-        Bag<T> bag = makeObject();
-        List<String> known = new ArrayList<String>();
-        List<String> known1A = new ArrayList<String>();
+        final Bag<T> bag = makeObject();
+        final List<String> known = new ArrayList<String>();
+        final List<String> known1A = new ArrayList<String>();
         known1A.add("A");
-        List<String> known2A = new ArrayList<String>();
+        final List<String> known2A = new ArrayList<String>();
         known2A.add("A");
         known2A.add("A");
-        List<String> known1B = new ArrayList<String>();
+        final List<String> known1B = new ArrayList<String>();
         known1B.add("B");
-        List<String> known1A1B = new ArrayList<String>();
+        final List<String> known1A1B = new ArrayList<String>();
         known1A1B.add("A");
         known1A1B.add("B");
         
@@ -200,7 +200,7 @@ public abstract class AbstractBagTest<T>
 
     @SuppressWarnings("unchecked")
     public void testSize() {
-        Bag<T> bag = makeObject();
+        final Bag<T> bag = makeObject();
         assertEquals("Should have 0 total items", 0, bag.size());
         bag.add((T) "A");
         assertEquals("Should have 1 total items", 1, bag.size());
@@ -221,14 +221,14 @@ public abstract class AbstractBagTest<T>
     
     @SuppressWarnings("unchecked")
     public void testRetainAll() {
-        Bag<T> bag = makeObject();
+        final Bag<T> bag = makeObject();
         bag.add((T) "A");
         bag.add((T) "A");
         bag.add((T) "A");
         bag.add((T) "B");
         bag.add((T) "B");
         bag.add((T) "C");
-        List<String> retains = new ArrayList<String>();
+        final List<String> retains = new ArrayList<String>();
         retains.add("B");
         retains.add("C");
         bag.retainAll(retains);
@@ -237,16 +237,16 @@ public abstract class AbstractBagTest<T>
 
     @SuppressWarnings("unchecked")
     public void testIterator() {
-        Bag<T> bag = makeObject();
+        final Bag<T> bag = makeObject();
         bag.add((T) "A");
         bag.add((T) "A");
         bag.add((T) "B");
         assertEquals("Bag should have 3 items", 3, bag.size());
-        Iterator<T> i = bag.iterator();
+        final Iterator<T> i = bag.iterator();
     
         boolean foundA = false;
         while (i.hasNext()) {
-            String element = (String) i.next();
+            final String element = (String) i.next();
             // ignore the first A, remove the second via Iterator.remove()
             if (element.equals("A")) {
                 if (foundA == false) {
@@ -264,46 +264,46 @@ public abstract class AbstractBagTest<T>
 
     @SuppressWarnings("unchecked")
     public void testIteratorFail() {
-        Bag<T> bag = makeObject();
+        final Bag<T> bag = makeObject();
         bag.add((T) "A");
         bag.add((T) "A");
         bag.add((T) "B");
-        Iterator<T> it = bag.iterator();
+        final Iterator<T> it = bag.iterator();
         it.next();
         bag.remove("A");
         try {
             it.next();
             fail("Should throw ConcurrentModificationException");
-        } catch (ConcurrentModificationException e) {
+        } catch (final ConcurrentModificationException e) {
             // expected
         }
     }
     
     @SuppressWarnings("unchecked")
     public void testIteratorFailNoMore() {
-        Bag<T> bag = makeObject();
+        final Bag<T> bag = makeObject();
         bag.add((T) "A");
         bag.add((T) "A");
         bag.add((T) "B");
-        Iterator<T> it = bag.iterator();
+        final Iterator<T> it = bag.iterator();
         it.next();
         it.next();
         it.next();
         try {
             it.next();
             fail("Should throw NoSuchElementException");
-        } catch (NoSuchElementException ex) {
+        } catch (final NoSuchElementException ex) {
             // expected
         }
     }
     
     @SuppressWarnings("unchecked")
     public void testIteratorFailDoubleRemove() {
-        Bag<T> bag = makeObject();
+        final Bag<T> bag = makeObject();
         bag.add((T) "A");
         bag.add((T) "A");
         bag.add((T) "B");
-        Iterator<T> it = bag.iterator();
+        final Iterator<T> it = bag.iterator();
         it.next();
         it.next();
         assertEquals(3, bag.size());
@@ -312,7 +312,7 @@ public abstract class AbstractBagTest<T>
         try {
             it.remove();
             fail("Should throw IllegalStateException");
-        } catch (IllegalStateException ex) {
+        } catch (final IllegalStateException ex) {
             // expected
         }
         assertEquals(2, bag.size());
@@ -323,11 +323,11 @@ public abstract class AbstractBagTest<T>
     
     @SuppressWarnings("unchecked")
     public void testIteratorRemoveProtectsInvariants() {
-        Bag<T> bag = makeObject();
+        final Bag<T> bag = makeObject();
         bag.add((T) "A");
         bag.add((T) "A");
         assertEquals(2, bag.size());
-        Iterator<T> it = bag.iterator();
+        final Iterator<T> it = bag.iterator();
         assertEquals("A", it.next());
         assertEquals(true, it.hasNext());
         it.remove();
@@ -339,21 +339,21 @@ public abstract class AbstractBagTest<T>
         assertEquals(0, bag.size());
         assertEquals(false, it.hasNext());
         
-        Iterator<T> it2 = bag.iterator();
+        final Iterator<T> it2 = bag.iterator();
         assertEquals(false, it2.hasNext());
     }
     
     @SuppressWarnings("unchecked")
     public void testToArray() {
-        Bag<T> bag = makeObject();
+        final Bag<T> bag = makeObject();
         bag.add((T) "A");
         bag.add((T) "A");
         bag.add((T) "B");
         bag.add((T) "B");
         bag.add((T) "C");
-        Object[] array = bag.toArray();
+        final Object[] array = bag.toArray();
         int a = 0, b = 0, c = 0;
-        for (Object element : array) {
+        for (final Object element : array) {
             a += element.equals("A") ? 1 : 0;
             b += element.equals("B") ? 1 : 0;
             c += element.equals("C") ? 1 : 0;
@@ -365,15 +365,15 @@ public abstract class AbstractBagTest<T>
 
     @SuppressWarnings("unchecked")
     public void testToArrayPopulate() {
-        Bag<T> bag = makeObject();
+        final Bag<T> bag = makeObject();
         bag.add((T) "A");
         bag.add((T) "A");
         bag.add((T) "B");
         bag.add((T) "B");
         bag.add((T) "C");
-        String[] array = bag.toArray(new String[0]);
+        final String[] array = bag.toArray(new String[0]);
         int a = 0, b = 0, c = 0;
-        for (String element : array) {
+        for (final String element : array) {
             a += element.equals("A") ? 1 : 0;
             b += element.equals("B") ? 1 : 0;
             c += element.equals("C") ? 1 : 0;
@@ -386,8 +386,8 @@ public abstract class AbstractBagTest<T>
     //-----------------------------------------------------------------------
     @SuppressWarnings("unchecked")
     public void testEquals() {
-        Bag<T> bag = makeObject();
-        Bag<T> bag2 = makeObject();
+        final Bag<T> bag = makeObject();
+        final Bag<T> bag2 = makeObject();
         assertEquals(true, bag.equals(bag2));
         bag.add((T) "A");
         assertEquals(false, bag.equals(bag2));
@@ -406,8 +406,8 @@ public abstract class AbstractBagTest<T>
 
     @SuppressWarnings("unchecked")
     public void testEqualsHashBag() {
-        Bag<T> bag = makeObject();
-        Bag<T> bag2 = new HashBag<T>();
+        final Bag<T> bag = makeObject();
+        final Bag<T> bag2 = new HashBag<T>();
         assertEquals(true, bag.equals(bag2));
         bag.add((T) "A");
         assertEquals(false, bag.equals(bag2));
@@ -426,8 +426,8 @@ public abstract class AbstractBagTest<T>
 
     @SuppressWarnings("unchecked")
     public void testHashCode() {
-        Bag<T> bag = makeObject();
-        Bag<T> bag2 = makeObject();
+        final Bag<T> bag = makeObject();
+        final Bag<T> bag2 = makeObject();
         assertEquals(0, bag.hashCode());
         assertEquals(0, bag2.hashCode());
         assertEquals(bag.hashCode(), bag2.hashCode());
@@ -453,13 +453,13 @@ public abstract class AbstractBagTest<T>
 
     //-----------------------------------------------------------------------
     public void testEmptyBagSerialization() throws IOException, ClassNotFoundException {
-        Bag<T> bag = makeObject();
+        final Bag<T> bag = makeObject();
         if (!(bag instanceof Serializable && isTestSerialization())) {
             return;
         }
         
-        byte[] objekt = writeExternalFormToBytes((Serializable) bag);
-        Bag<?> bag2 = (Bag<?>) readExternalFormFromBytes(objekt);
+        final byte[] objekt = writeExternalFormToBytes((Serializable) bag);
+        final Bag<?> bag2 = (Bag<?>) readExternalFormFromBytes(objekt);
 
         assertEquals("Bag should be empty",0, bag.size());
         assertEquals("Bag should be empty",0, bag2.size());
@@ -467,19 +467,19 @@ public abstract class AbstractBagTest<T>
 
     @SuppressWarnings("unchecked")
     public void testFullBagSerialization() throws IOException, ClassNotFoundException {
-        Bag<T> bag = makeObject();
+        final Bag<T> bag = makeObject();
         bag.add((T) "A");
         bag.add((T) "A");
         bag.add((T) "B");
         bag.add((T) "B");
         bag.add((T) "C");
-        int size = bag.size();
+        final int size = bag.size();
         if (!(bag instanceof Serializable && isTestSerialization())) {
             return;
         }
         
-        byte[] objekt = writeExternalFormToBytes((Serializable) bag);
-        Bag<?> bag2 = (Bag<?>) readExternalFormFromBytes(objekt);
+        final byte[] objekt = writeExternalFormToBytes((Serializable) bag);
+        final Bag<?> bag2 = (Bag<?>) readExternalFormFromBytes(objekt);
 
         assertEquals("Bag should be same size", size, bag.size());
         assertEquals("Bag should be same size", size, bag2.size());
@@ -503,9 +503,9 @@ public abstract class AbstractBagTest<T>
      */
     public void testEmptyBagCompatibility() throws IOException, ClassNotFoundException {
         // test to make sure the canonical form has been preserved
-        Bag<T> bag = makeObject();
+        final Bag<T> bag = makeObject();
         if (bag instanceof Serializable && !skipSerializedCanonicalTests() && isTestSerialization()) {
-            Bag<?> bag2 = (Bag<?>) readExternalFormFromDisk(getCanonicalEmptyCollectionName(bag));
+            final Bag<?> bag2 = (Bag<?>) readExternalFormFromDisk(getCanonicalEmptyCollectionName(bag));
             assertTrue("Bag is empty",bag2.size()  == 0);
             assertEquals(bag, bag2);
         }
@@ -518,14 +518,14 @@ public abstract class AbstractBagTest<T>
     @SuppressWarnings("unchecked")
     public void testFullBagCompatibility() throws IOException, ClassNotFoundException {
         // test to make sure the canonical form has been preserved
-        Bag<T> bag = makeObject();
+        final Bag<T> bag = makeObject();
         bag.add((T) "A");
         bag.add((T) "A");
         bag.add((T) "B");
         bag.add((T) "B");
         bag.add((T) "C");
         if (bag instanceof Serializable && !skipSerializedCanonicalTests() && isTestSerialization()) {
-            Bag<?> bag2 = (Bag<?>) readExternalFormFromDisk(getCanonicalFullCollectionName(bag));
+            final Bag<?> bag2 = (Bag<?>) readExternalFormFromDisk(getCanonicalFullCollectionName(bag));
             assertEquals("Bag is the right size",bag.size(), bag2.size());
             assertEquals(bag, bag2);
         }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/AbstractSortedBagTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/AbstractSortedBagTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/AbstractSortedBagTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/AbstractSortedBagTest.java Mon Jan  7 17:15:14 2013
@@ -28,7 +28,7 @@ import org.apache.commons.collections.So
  */
 public abstract class AbstractSortedBagTest<T> extends AbstractBagTest<T> {
 
-    public AbstractSortedBagTest(String testName) {
+    public AbstractSortedBagTest(final String testName) {
         super(testName);
     }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/HashBagTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/HashBagTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/HashBagTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/HashBagTest.java Mon Jan  7 17:15:14 2013
@@ -26,7 +26,7 @@ import org.apache.commons.collections.Ba
  */
 public class HashBagTest<T> extends AbstractBagTest<T> {
     
-    public HashBagTest(String testName) {
+    public HashBagTest(final String testName) {
         super(testName);
     }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/PredicatedBagTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/PredicatedBagTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/PredicatedBagTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/PredicatedBagTest.java Mon Jan  7 17:15:14 2013
@@ -31,7 +31,7 @@ import org.apache.commons.collections.fu
  */
 public class PredicatedBagTest<T> extends AbstractBagTest<T> {
 
-    public PredicatedBagTest(String testName) {
+    public PredicatedBagTest(final String testName) {
         super(testName);
     }
 
@@ -39,7 +39,7 @@ public class PredicatedBagTest<T> extend
 
     protected Predicate<T> stringPredicate() {
         return new Predicate<T>() {
-            public boolean evaluate(T o) {
+            public boolean evaluate(final T o) {
                 return o instanceof String;
             }
         };
@@ -47,7 +47,7 @@ public class PredicatedBagTest<T> extend
 
     protected Predicate<T> truePredicate = TruePredicate.<T>truePredicate();
 
-    protected Bag<T> decorateBag(HashBag<T> bag, Predicate<T> predicate) {
+    protected Bag<T> decorateBag(final HashBag<T> bag, final Predicate<T> predicate) {
         return PredicatedBag.predicatedBag(bag, predicate);
     }
 
@@ -64,9 +64,9 @@ public class PredicatedBagTest<T> extend
 
     @SuppressWarnings("unchecked")
     public void testlegalAddRemove() {
-        Bag<T> bag = makeTestBag();
+        final Bag<T> bag = makeTestBag();
         assertEquals(0, bag.size());
-        T[] els = (T[]) new Object[] { "1", "3", "5", "7", "2", "4", "1" };
+        final T[] els = (T[]) new Object[] { "1", "3", "5", "7", "2", "4", "1" };
         for (int i = 0; i < els.length; i++) {
             bag.add(els[i]);
             assertEquals(i + 1, bag.size());
@@ -82,12 +82,12 @@ public class PredicatedBagTest<T> extend
 
     @SuppressWarnings("unchecked")
     public void testIllegalAdd() {
-        Bag<T> bag = makeTestBag();
-        Integer i = new Integer(3);
+        final Bag<T> bag = makeTestBag();
+        final Integer i = new Integer(3);
         try {
             bag.add((T) i);
             fail("Integer should fail string predicate.");
-        } catch (IllegalArgumentException e) {
+        } catch (final IllegalArgumentException e) {
             // expected
         }
         assertTrue("Collection shouldn't contain illegal element",
@@ -96,7 +96,7 @@ public class PredicatedBagTest<T> extend
 
     @SuppressWarnings("unchecked")
     public void testIllegalDecorate() {
-        HashBag<Object> elements = new HashBag<Object>();
+        final HashBag<Object> elements = new HashBag<Object>();
         elements.add("one");
         elements.add("two");
         elements.add(new Integer(3));
@@ -104,13 +104,13 @@ public class PredicatedBagTest<T> extend
         try {
             decorateBag((HashBag<T>) elements, stringPredicate());
             fail("Bag contains an element that should fail the predicate.");
-        } catch (IllegalArgumentException e) {
+        } catch (final IllegalArgumentException e) {
             // expected
         }
         try {
             decorateBag(new HashBag<T>(), null);
             fail("Expectiing IllegalArgumentException for null predicate.");
-        } catch (IllegalArgumentException e) {
+        } catch (final IllegalArgumentException e) {
             // expected
         }
     }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/PredicatedSortedBagTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/PredicatedSortedBagTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/PredicatedSortedBagTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/PredicatedSortedBagTest.java Mon Jan  7 17:15:14 2013
@@ -31,9 +31,9 @@ import org.apache.commons.collections.fu
  */
 public class PredicatedSortedBagTest<T> extends AbstractSortedBagTest<T> {
 
-    private SortedBag<T> nullBag = null;
+    private final SortedBag<T> nullBag = null;
 
-    public PredicatedSortedBagTest(String testName) {
+    public PredicatedSortedBagTest(final String testName) {
         super(testName);
     }
 
@@ -41,7 +41,7 @@ public class PredicatedSortedBagTest<T> 
 
     protected Predicate<T> stringPredicate() {
         return new Predicate<T>() {
-            public boolean evaluate(T o) {
+            public boolean evaluate(final T o) {
                 return o instanceof String;
             }
         };
@@ -49,7 +49,7 @@ public class PredicatedSortedBagTest<T> 
 
     protected Predicate<T> truePredicate = TruePredicate.<T>truePredicate();
 
-    protected SortedBag<T> decorateBag(SortedBag<T> bag, Predicate<T> predicate) {
+    protected SortedBag<T> decorateBag(final SortedBag<T> bag, final Predicate<T> predicate) {
         return PredicatedSortedBag.predicatedSortedBag(bag, predicate);
     }
 
@@ -65,30 +65,30 @@ public class PredicatedSortedBagTest<T> 
     //--------------------------------------------------------------------------
 
     public void testDecorate() {
-        SortedBag<T> bag = decorateBag(new TreeBag<T>(), stringPredicate());
+        final SortedBag<T> bag = decorateBag(new TreeBag<T>(), stringPredicate());
         ((PredicatedSortedBag<T>) bag).decorated();
         try {
             decorateBag(new TreeBag<T>(), null);
             fail("Expecting IllegalArgumentException for null predicate");
-        } catch (IllegalArgumentException e) {}
+        } catch (final IllegalArgumentException e) {}
         try {
             decorateBag(nullBag, stringPredicate());
             fail("Expecting IllegalArgumentException for null bag");
-        } catch (IllegalArgumentException e) {}
+        } catch (final IllegalArgumentException e) {}
     }
 
     @SuppressWarnings("unchecked")
     public void testSortOrder() {
-        SortedBag<T> bag = decorateBag(new TreeBag<T>(), stringPredicate());
-        String one = "one";
-        String two = "two";
-        String three = "three";
+        final SortedBag<T> bag = decorateBag(new TreeBag<T>(), stringPredicate());
+        final String one = "one";
+        final String two = "two";
+        final String three = "three";
         bag.add((T) one);
         bag.add((T) two);
         bag.add((T) three);
         assertEquals("first element", bag.first(), one);
         assertEquals("last element", bag.last(), two);
-        Comparator<? super T> c = bag.comparator();
+        final Comparator<? super T> c = bag.comparator();
         assertTrue("natural order, so comparator should be null", c == null);
     }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/TransformedBagTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/TransformedBagTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/TransformedBagTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/TransformedBagTest.java Mon Jan  7 17:15:14 2013
@@ -29,7 +29,7 @@ import org.apache.commons.collections.co
  */
 public class TransformedBagTest<T> extends AbstractBagTest<T> {
 
-    public TransformedBagTest(String testName) {
+    public TransformedBagTest(final String testName) {
         super(testName);
     }
 
@@ -43,10 +43,10 @@ public class TransformedBagTest<T> exten
     @SuppressWarnings("unchecked")
     public void testTransformedBag() {
         //T had better be Object!
-        Bag<T> bag = TransformedBag.transformingBag(new HashBag<T>(),
+        final Bag<T> bag = TransformedBag.transformingBag(new HashBag<T>(),
                 (Transformer<T, T>) TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER);
         assertEquals(0, bag.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++) {
             bag.add((T) els[i]);
             assertEquals(i + 1, bag.size());
@@ -60,15 +60,15 @@ public class TransformedBagTest<T> exten
 
     @SuppressWarnings("unchecked")
     public void testTransformedBag_decorateTransform() {
-        Bag<T> originalBag = new HashBag<T>();
-        Object[] els = new Object[] {"1", "3", "5", "7", "2", "4", "6"};
-        for (Object el : els) {
+        final Bag<T> originalBag = new HashBag<T>();
+        final Object[] els = new Object[] {"1", "3", "5", "7", "2", "4", "6"};
+        for (final Object el : els) {
             originalBag.add((T) el);
         }
-        Bag<T> bag = TransformedBag.transformedBag(originalBag,
+        final Bag<T> bag = TransformedBag.transformedBag(originalBag,
                 (Transformer<T, T>) TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER);
         assertEquals(els.length, bag.size());
-        for (Object el : els) {
+        for (final Object el : els) {
             assertEquals(true, bag.contains(new Integer((String) el)));
             assertEquals(false, bag.contains(el));
         }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/TransformedSortedBagTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/TransformedSortedBagTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/TransformedSortedBagTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/TransformedSortedBagTest.java Mon Jan  7 17:15:14 2013
@@ -30,7 +30,7 @@ import org.apache.commons.collections.co
  */
 public class TransformedSortedBagTest<T> extends AbstractSortedBagTest<T> {
 
-    public TransformedSortedBagTest(String testName) {
+    public TransformedSortedBagTest(final String testName) {
         super(testName);
     }
 
@@ -42,9 +42,9 @@ public class TransformedSortedBagTest<T>
 
     @SuppressWarnings("unchecked")
     public void testTransformedBag() {
-        SortedBag<T> bag = TransformedSortedBag.transformingSortedBag(new TreeBag<T>(), (Transformer<T, T>) TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER);
+        final SortedBag<T> bag = TransformedSortedBag.transformingSortedBag(new TreeBag<T>(), (Transformer<T, T>) TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER);
         assertEquals(0, bag.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++) {
             bag.add((T) els[i]);
             assertEquals(i + 1, bag.size());
@@ -56,14 +56,14 @@ public class TransformedSortedBagTest<T>
     }
 
     public void testTransformedBag_decorateTransform() {
-        Bag<Object> originalBag = new TreeBag<Object>();
-        Object[] els = new Object[] {"1", "3", "5", "7", "2", "4", "6"};
-        for (Object el : els) {
+        final Bag<Object> originalBag = new TreeBag<Object>();
+        final Object[] els = new Object[] {"1", "3", "5", "7", "2", "4", "6"};
+        for (final Object el : els) {
             originalBag.add(el);
         }
-        Bag<?> bag = TransformedBag.transformedBag(originalBag, TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER);
+        final Bag<?> bag = TransformedBag.transformedBag(originalBag, TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER);
         assertEquals(els.length, bag.size());
-        for (Object el : els) {
+        for (final Object el : els) {
             assertEquals(true, bag.contains(new Integer((String) el)));
         }
         

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/TreeBagTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/TreeBagTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/TreeBagTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/TreeBagTest.java Mon Jan  7 17:15:14 2013
@@ -27,7 +27,7 @@ import org.apache.commons.collections.So
  */
 public class TreeBagTest<T> extends AbstractSortedBagTest<T> {
 
-    public TreeBagTest(String testName) {
+    public TreeBagTest(final String testName) {
         super(testName);
     }
 
@@ -38,18 +38,18 @@ public class TreeBagTest<T> extends Abst
 
    // TODO: Generics (for example... is this even needed?)
    public void testCollections265() {
-       Bag<Object> bag = new TreeBag<Object>();
+       final Bag<Object> bag = new TreeBag<Object>();
        try {
            bag.add(new Object());
            fail("IllegalArgumentException expected");
-       } catch(IllegalArgumentException iae) {
+       } catch(final IllegalArgumentException iae) {
            // expected;
        }
    }
    
     @SuppressWarnings("unchecked")
     public SortedBag<T> setupBag() {
-        SortedBag<T> bag = makeObject();
+        final SortedBag<T> bag = makeObject();
         bag.add((T) "C");
         bag.add((T) "A");
         bag.add((T) "B");
@@ -58,7 +58,7 @@ public class TreeBagTest<T> extends Abst
     }
 
     public void testOrdering() {
-        Bag<T> bag = setupBag();
+        final Bag<T> bag = setupBag();
         assertEquals("Should get elements in correct order", "A", bag.toArray()[0]);
         assertEquals("Should get elements in correct order", "B", bag.toArray()[1]);
         assertEquals("Should get elements in correct order", "C", bag.toArray()[2]);

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/AbstractBidiMapTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/AbstractBidiMapTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/AbstractBidiMapTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/AbstractBidiMapTest.java Mon Jan  7 17:15:14 2013
@@ -35,7 +35,7 @@ import org.apache.commons.collections.ma
  */
 public abstract class AbstractBidiMapTest<K, V> extends AbstractIterableMapTest<K, V> {
 
-    public AbstractBidiMapTest(String testName) {
+    public AbstractBidiMapTest(final String testName) {
         super(testName);
     }
 
@@ -84,8 +84,8 @@ public abstract class AbstractBidiMapTes
             return;
         }
 
-        BidiMap<K, V> map = makeObject();
-        BidiMap<V, K> inverse = map.inverseBidiMap();
+        final BidiMap<K, V> map = makeObject();
+        final BidiMap<V, K> inverse = map.inverseBidiMap();
         assertEquals(0, map.size());
         assertEquals(map.size(), inverse.size());
 
@@ -127,12 +127,12 @@ public abstract class AbstractBidiMapTes
 
     public void verifyInverse() {
         assertEquals(map.size(), ((BidiMap<K, V>) map).inverseBidiMap().size());
-        Map<K, V> map1 = new HashMap<K, V>(map);
-        Map<V, K> map2 = new HashMap<V, K>(((BidiMap<K, V>) map).inverseBidiMap());
-        Set<K> keys1 = map1.keySet();
-        Set<V> keys2 = map2.keySet();
-        Collection<V> values1 = map1.values();
-        Collection<K> values2 = map2.values();
+        final Map<K, V> map1 = new HashMap<K, V>(map);
+        final Map<V, K> map2 = new HashMap<V, K>(((BidiMap<K, V>) map).inverseBidiMap());
+        final Set<K> keys1 = map1.keySet();
+        final Set<V> keys2 = map2.keySet();
+        final Collection<V> values1 = map1.values();
+        final Collection<K> values2 = map2.values();
         assertEquals(true, keys1.containsAll(values2));
         assertEquals(true, values2.containsAll(keys1));
         assertEquals(true, values1.containsAll(keys2));
@@ -152,7 +152,7 @@ public abstract class AbstractBidiMapTes
             getSampleKeys()[0]);
     }
 
-    private final void doTestGetKey(BidiMap<?, ?> map, Object key, Object value) {
+    private final void doTestGetKey(final BidiMap<?, ?> map, final Object key, final Object value) {
         assertEquals("Value not found for key.", value, map.get(key));
         assertEquals("Key not found for value.", key, map.getKey(value));
     }
@@ -190,7 +190,7 @@ public abstract class AbstractBidiMapTes
     }
 
     @SuppressWarnings("unchecked")
-    private final <T> void modifyEntrySet(BidiMap<?, T> map) {
+    private final <T> void modifyEntrySet(final BidiMap<?, T> map) {
         // Gets first entry
         final Map.Entry<?, T> entry = map.entrySet().iterator().next();
 
@@ -218,7 +218,7 @@ public abstract class AbstractBidiMapTes
             try {
                 makeFullMap().clear();
                 fail();
-            } catch(UnsupportedOperationException ex) {}
+            } catch(final UnsupportedOperationException ex) {}
             return;
         }
 
@@ -241,11 +241,11 @@ public abstract class AbstractBidiMapTes
             try {
                 makeFullMap().remove(getSampleKeys()[0]);
                 fail();
-            } catch(UnsupportedOperationException ex) {}
+            } catch(final UnsupportedOperationException ex) {}
             try {
                 makeFullMap().removeValue(getSampleValues()[0]);
                 fail();
-            } catch(UnsupportedOperationException ex) {}
+            } catch(final UnsupportedOperationException ex) {}
             return;
         }
 
@@ -258,13 +258,13 @@ public abstract class AbstractBidiMapTes
         assertEquals(null, makeFullMap().removeValue("NotPresent"));
     }
 
-    private final void remove(BidiMap<?, ?> map, Object key) {
+    private final void remove(final BidiMap<?, ?> map, final Object key) {
         final Object value = map.remove(key);
         assertTrue("Key was not removed.", !map.containsKey(key));
         assertNull("Value was not removed.", map.getKey(value));
     }
 
-    private final void removeValue(BidiMap<?, ?> map, Object value) {
+    private final void removeValue(final BidiMap<?, ?> map, final Object value) {
         final Object key = map.removeValue(value);
         assertTrue("Key was not removed.", !map.containsKey(key));
         assertNull("Value was not removed.", map.getKey(value));
@@ -273,11 +273,11 @@ public abstract class AbstractBidiMapTes
     //-----------------------------------------------------------------------
     public void testBidiKeySetValuesOrder() {
         resetFull();
-        Iterator<K> keys = map.keySet().iterator();
-        Iterator<V> values = map.values().iterator();
+        final Iterator<K> keys = map.keySet().iterator();
+        final Iterator<V> values = map.values().iterator();
         for (; keys.hasNext() && values.hasNext();) {
-            K key = keys.next();
-            V value = values.next();
+            final K key = keys.next();
+            final V value = values.next();
             assertSame(map.get(key), value);
         }
         assertEquals(false, keys.hasNext());
@@ -294,7 +294,7 @@ public abstract class AbstractBidiMapTes
         removeByKeySet(makeFullMap().inverseBidiMap(), getSampleValues()[0], getSampleKeys()[0]);
     }
 
-    private final void removeByKeySet(BidiMap<?, ?> map, Object key, Object value) {
+    private final void removeByKeySet(final BidiMap<?, ?> map, final Object key, final Object value) {
         map.keySet().remove(key);
 
         assertTrue("Key was not removed.", !map.containsKey(key));
@@ -318,8 +318,8 @@ public abstract class AbstractBidiMapTes
         removeByEntrySet(makeFullMap().inverseBidiMap(), getSampleValues()[0], getSampleKeys()[0]);
     }
 
-    private final void removeByEntrySet(BidiMap<?, ?> map, Object key, Object value) {
-        Map<Object, Object> temp = new HashMap<Object, Object>();
+    private final void removeByEntrySet(final BidiMap<?, ?> map, final Object key, final Object value) {
+        final Map<Object, Object> temp = new HashMap<Object, Object>();
         temp.put(key, value);
         map.entrySet().remove(temp.entrySet().iterator().next());
 
@@ -353,28 +353,28 @@ public abstract class AbstractBidiMapTes
             super();
         }
         public void testMapEntrySetIteratorEntrySetValueCrossCheck() {
-            K key1 = getSampleKeys()[0];
-            K key2 = getSampleKeys()[1];
-            V newValue1 = getNewSampleValues()[0];
-            V newValue2 = getNewSampleValues()[1];
+            final K key1 = getSampleKeys()[0];
+            final K key2 = getSampleKeys()[1];
+            final V newValue1 = getNewSampleValues()[0];
+            final V newValue2 = getNewSampleValues()[1];
 
             resetFull();
             // explicitly get entries as sample values/keys are connected for some maps
             // such as BeanMap
             Iterator<Map.Entry<K, V>> it = TestBidiMapEntrySet.this.getCollection().iterator();
-            Map.Entry<K, V> entry1 = getEntry(it, key1);
+            final Map.Entry<K, V> entry1 = getEntry(it, key1);
             it = TestBidiMapEntrySet.this.getCollection().iterator();
-            Map.Entry<K, V> entry2 = getEntry(it, key2);
+            final Map.Entry<K, V> entry2 = getEntry(it, key2);
             Iterator<Map.Entry<K, V>> itConfirmed = TestBidiMapEntrySet.this.getConfirmed().iterator();
-            Map.Entry<K, V> entryConfirmed1 = getEntry(itConfirmed, key1);
+            final Map.Entry<K, V> entryConfirmed1 = getEntry(itConfirmed, key1);
             itConfirmed = TestBidiMapEntrySet.this.getConfirmed().iterator();
-            Map.Entry<K, V> entryConfirmed2 = getEntry(itConfirmed, key2);
+            final Map.Entry<K, V> entryConfirmed2 = getEntry(itConfirmed, key2);
             TestBidiMapEntrySet.this.verify();
 
             if (isSetValueSupported() == false) {
                 try {
                     entry1.setValue(newValue1);
-                } catch (UnsupportedOperationException ex) {
+                } catch (final UnsupportedOperationException ex) {
                 }
                 return;
             }
@@ -389,7 +389,7 @@ public abstract class AbstractBidiMapTes
             // key1=newValue1, key2=newValue2
             try {
                 entry2.setValue(newValue1);  // should remove key1
-            } catch (IllegalArgumentException ex) {
+            } catch (final IllegalArgumentException ex) {
                 return;  // simplest way of dealing with tricky situation
             }
             entryConfirmed2.setValue(newValue1);
@@ -417,7 +417,7 @@ public abstract class AbstractBidiMapTes
     public class TestInverseBidiMap extends AbstractBidiMapTest<V, K> {
         final AbstractBidiMapTest<K, V> main;
 
-        public TestInverseBidiMap(AbstractBidiMapTest<K, V> main) {
+        public TestInverseBidiMap(final AbstractBidiMapTest<K, V> main) {
             super();
             this.main = main;
         }
@@ -536,20 +536,20 @@ public abstract class AbstractBidiMapTes
 
     //-----------------------------------------------------------------------
     public void testBidiMapIteratorSet() {
-        V newValue1 = getOtherValues()[0];
-        V newValue2 = getOtherValues()[1];
+        final V newValue1 = getOtherValues()[0];
+        final V newValue2 = getOtherValues()[1];
 
         resetFull();
-        BidiMap<K, V> bidi = getMap();
-        MapIterator<K, V> it = bidi.mapIterator();
+        final BidiMap<K, V> bidi = getMap();
+        final MapIterator<K, V> it = bidi.mapIterator();
         assertEquals(true, it.hasNext());
-        K key1 = it.next();
+        final K key1 = it.next();
 
         if (isSetValueSupported() == false) {
             try {
                 it.setValue(newValue1);
                 fail();
-            } catch (UnsupportedOperationException ex) {
+            } catch (final UnsupportedOperationException ex) {
             }
             return;
         }
@@ -572,7 +572,7 @@ public abstract class AbstractBidiMapTes
         assertEquals(newValue1, bidi.get(key1));
         verify();
 
-        K key2 = it.next();
+        final K key2 = it.next();
         it.setValue(newValue2);
         confirmed.put(key2, newValue2);
         assertSame(key2, it.getKey());
@@ -587,7 +587,7 @@ public abstract class AbstractBidiMapTes
         try {
             it.setValue(newValue1);  // should remove key1
             fail();
-        } catch (IllegalArgumentException ex) {
+        } catch (final IllegalArgumentException ex) {
             return;  // simplest way of dealing with tricky situation
         }
         confirmed.put(key2, newValue1);

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/AbstractOrderedBidiMapDecoratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/AbstractOrderedBidiMapDecoratorTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/AbstractOrderedBidiMapDecoratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/AbstractOrderedBidiMapDecoratorTest.java Mon Jan  7 17:15:14 2013
@@ -29,7 +29,7 @@ import org.apache.commons.collections.Or
 public class AbstractOrderedBidiMapDecoratorTest<K, V>
         extends AbstractOrderedBidiMapTest<K, V> {
 
-    public AbstractOrderedBidiMapDecoratorTest(String testName) {
+    public AbstractOrderedBidiMapDecoratorTest(final String testName) {
         super(testName);
     }
 
@@ -72,7 +72,7 @@ public class AbstractOrderedBidiMapDecor
             super(new DualTreeBidiMap<K, V>());
         }
 
-        public TestOrderedBidiMap(OrderedBidiMap<K, V> map) {
+        public TestOrderedBidiMap(final OrderedBidiMap<K, V> map) {
             super(map);
         }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/AbstractOrderedBidiMapTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/AbstractOrderedBidiMapTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/AbstractOrderedBidiMapTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/AbstractOrderedBidiMapTest.java Mon Jan  7 17:15:14 2013
@@ -35,7 +35,7 @@ import org.apache.commons.collections.it
  */
 public abstract class AbstractOrderedBidiMapTest<K, V> extends AbstractBidiMapTest<K, V> {
 
-    public AbstractOrderedBidiMapTest(String testName) {
+    public AbstractOrderedBidiMapTest(final String testName) {
         super(testName);
     }
 
@@ -50,11 +50,11 @@ public abstract class AbstractOrderedBid
         try {
             bidi.firstKey();
             fail();
-        } catch (NoSuchElementException ex) {}
+        } catch (final NoSuchElementException ex) {}
 
         resetFull();
         bidi = getMap();
-        K confirmedFirst = confirmed.keySet().iterator().next();
+        final K confirmedFirst = confirmed.keySet().iterator().next();
         assertEquals(confirmedFirst, bidi.firstKey());
     }
 
@@ -64,12 +64,12 @@ public abstract class AbstractOrderedBid
         try {
             bidi.lastKey();
             fail();
-        } catch (NoSuchElementException ex) {}
+        } catch (final NoSuchElementException ex) {}
 
         resetFull();
         bidi = getMap();
         K confirmedLast = null;
-        for (Iterator<K> it = confirmed.keySet().iterator(); it.hasNext();) {
+        for (final Iterator<K> it = confirmed.keySet().iterator(); it.hasNext();) {
             confirmedLast = it.next();
         }
         assertEquals(confirmedLast, bidi.lastKey());
@@ -83,17 +83,17 @@ public abstract class AbstractOrderedBid
         if (isAllowNullKey() == false) {
             try {
                 assertEquals(null, bidi.nextKey(null)); // this is allowed too
-            } catch (NullPointerException ex) {}
+            } catch (final NullPointerException ex) {}
         } else {
             assertEquals(null, bidi.nextKey(null));
         }
 
         resetFull();
         bidi = (OrderedBidiMap<K, V>) map;
-        Iterator<K> it = confirmed.keySet().iterator();
+        final Iterator<K> it = confirmed.keySet().iterator();
         K confirmedLast = it.next();
         while (it.hasNext()) {
-            K confirmedObject = it.next();
+            final K confirmedObject = it.next();
             assertEquals(confirmedObject, bidi.nextKey(confirmedLast));
             confirmedLast = confirmedObject;
         }
@@ -103,7 +103,7 @@ public abstract class AbstractOrderedBid
             try {
                 bidi.nextKey(null);
                 fail();
-            } catch (NullPointerException ex) {}
+            } catch (final NullPointerException ex) {}
         } else {
             assertEquals(null, bidi.nextKey(null));
         }
@@ -116,19 +116,19 @@ public abstract class AbstractOrderedBid
         if (isAllowNullKey() == false) {
             try {
                 assertEquals(null, bidi.previousKey(null)); // this is allowed too
-            } catch (NullPointerException ex) {}
+            } catch (final NullPointerException ex) {}
         } else {
             assertEquals(null, bidi.previousKey(null));
         }
 
         resetFull();
         bidi = getMap();
-        List<K> list = new ArrayList<K>(confirmed.keySet());
+        final List<K> list = new ArrayList<K>(confirmed.keySet());
         Collections.reverse(list);
-        Iterator<K> it = list.iterator();
+        final Iterator<K> it = list.iterator();
         K confirmedLast = it.next();
         while (it.hasNext()) {
-            K confirmedObject = it.next();
+            final K confirmedObject = it.next();
             assertEquals(confirmedObject, bidi.previousKey(confirmedLast));
             confirmedLast = confirmedObject;
         }
@@ -138,7 +138,7 @@ public abstract class AbstractOrderedBid
             try {
                 bidi.previousKey(null);
                 fail();
-            } catch (NullPointerException ex) {}
+            } catch (final NullPointerException ex) {}
         } else {
             assertEquals(null, bidi.previousKey(null));
         }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/AbstractSortedBidiMapTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/AbstractSortedBidiMapTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/AbstractSortedBidiMapTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/AbstractSortedBidiMapTest.java Mon Jan  7 17:15:14 2013
@@ -42,13 +42,13 @@ public abstract class AbstractSortedBidi
     protected List<V> sortedValues = new ArrayList<V>();
     protected SortedSet<V> sortedNewValues = new TreeSet<V>();
 
-    public AbstractSortedBidiMapTest(String testName) {
+    public AbstractSortedBidiMapTest(final String testName) {
         super(testName);
         sortedKeys = getAsList(getSampleKeys());
         Collections.sort(sortedKeys);
         sortedKeys = Collections.unmodifiableList(sortedKeys);
 
-        Map<K, V> map = new TreeMap<K, V>();
+        final Map<K, V> map = new TreeMap<K, V>();
         addSampleMappings(map);
 
         sortedValues.addAll(map.values());
@@ -107,15 +107,15 @@ public abstract class AbstractSortedBidi
     //-----------------------------------------------------------------------
     public void testBidiHeadMapContains() {
         // extra test as other tests get complex
-        SortedBidiMap<K, V> sm = makeFullMap();
-        Iterator<K> it = sm.keySet().iterator();
-        K first = it.next();
-        K toKey = it.next();
-        K second = it.next();
-        V firstValue = sm.get(first);
-        V secondValue = sm.get(second);
+        final SortedBidiMap<K, V> sm = makeFullMap();
+        final Iterator<K> it = sm.keySet().iterator();
+        final K first = it.next();
+        final K toKey = it.next();
+        final K second = it.next();
+        final V firstValue = sm.get(first);
+        final V secondValue = sm.get(second);
 
-        SortedMap<K, V> head = sm.headMap(toKey);
+        final SortedMap<K, V> head = sm.headMap(toKey);
         assertEquals(1, head.size());
         assertEquals(true, sm.containsKey(first));
         assertEquals(true, head.containsKey(first));
@@ -134,18 +134,18 @@ public abstract class AbstractSortedBidi
         }
 
         // extra test as other tests get complex
-        SortedBidiMap<K, V> sm = makeFullMap();
-        Iterator<K> it = sm.keySet().iterator();
-        K first = it.next();
-        K second = it.next();
-        K toKey = it.next();
-
-        V firstValue = sm.get(first);
-        V secondValue = sm.get(second);
-        V toKeyValue = sm.get(toKey);
+        final SortedBidiMap<K, V> sm = makeFullMap();
+        final Iterator<K> it = sm.keySet().iterator();
+        final K first = it.next();
+        final K second = it.next();
+        final K toKey = it.next();
+
+        final V firstValue = sm.get(first);
+        final V secondValue = sm.get(second);
+        final V toKeyValue = sm.get(toKey);
 
-        SortedMap<K, V> sub = sm.headMap(toKey);
-        int size = sm.size();
+        final SortedMap<K, V> sub = sm.headMap(toKey);
+        final int size = sm.size();
         assertEquals(2, sub.size());
         sub.clear();
         assertEquals(0, sub.size());
@@ -181,21 +181,21 @@ public abstract class AbstractSortedBidi
         }
 
         // extra test as other tests get complex
-        SortedBidiMap<K, V> sm = makeFullMap();
-        Iterator<K> it = sm.keySet().iterator();
-        K first = it.next();
-        K second = it.next();
-        K toKey = it.next();
+        final SortedBidiMap<K, V> sm = makeFullMap();
+        final Iterator<K> it = sm.keySet().iterator();
+        final K first = it.next();
+        final K second = it.next();
+        final K toKey = it.next();
 
-        int size = sm.size();
-        SortedMap<K, V> sub = sm.headMap(toKey);
+        final int size = sm.size();
+        final SortedMap<K, V> sub = sm.headMap(toKey);
         assertEquals(2, sub.size());
         assertEquals(true, sm.containsKey(first));
         assertEquals(true, sub.containsKey(first));
         assertEquals(true, sm.containsKey(second));
         assertEquals(true, sub.containsKey(second));
 
-        V firstValue = sub.remove(first);
+        final V firstValue = sub.remove(first);
         assertEquals(1, sub.size());
         assertEquals(size - 1, sm.size());
         assertEquals(size - 1, sm.inverseBidiMap().size());
@@ -206,7 +206,7 @@ public abstract class AbstractSortedBidi
         assertEquals(false, sub.containsKey(first));
         assertEquals(false, sub.containsValue(firstValue));
 
-        V secondValue = sub.remove(second);
+        final V secondValue = sub.remove(second);
         assertEquals(0, sub.size());
         assertEquals(size - 2, sm.size());
         assertEquals(size - 2, sm.inverseBidiMap().size());
@@ -225,21 +225,21 @@ public abstract class AbstractSortedBidi
         }
 
         // extra test as other tests get complex
-        SortedBidiMap<K, V> sm = makeFullMap();
-        Iterator<K> it = sm.keySet().iterator();
-        K first = it.next();
-        K second = it.next();
-        K toKey = it.next();
-
-        int size = sm.size();
-        SortedMap<K, V> sub = sm.headMap(toKey);
-        Set<Map.Entry<K, V>> set = sub.entrySet();
+        final SortedBidiMap<K, V> sm = makeFullMap();
+        final Iterator<K> it = sm.keySet().iterator();
+        final K first = it.next();
+        final K second = it.next();
+        final K toKey = it.next();
+
+        final int size = sm.size();
+        final SortedMap<K, V> sub = sm.headMap(toKey);
+        final Set<Map.Entry<K, V>> set = sub.entrySet();
         assertEquals(2, sub.size());
         assertEquals(2, set.size());
 
-        Iterator<Map.Entry<K, V>> it2 = set.iterator();
-        Map.Entry<K, V> firstEntry = cloneMapEntry(it2.next());
-        Map.Entry<K, V> secondEntry = cloneMapEntry(it2.next());
+        final Iterator<Map.Entry<K, V>> it2 = set.iterator();
+        final Map.Entry<K, V> firstEntry = cloneMapEntry(it2.next());
+        final Map.Entry<K, V> secondEntry = cloneMapEntry(it2.next());
         assertEquals(true, sm.containsKey(first));
         assertEquals(true, sub.containsKey(first));
         assertEquals(true, set.contains(firstEntry));
@@ -276,16 +276,16 @@ public abstract class AbstractSortedBidi
     //-----------------------------------------------------------------------
     public void testBidiTailMapContains() {
         // extra test as other tests get complex
-        SortedBidiMap<K, V> sm = makeFullMap();
-        Iterator<K> it = sm.keySet().iterator();
-        K first = it.next();
-        K fromKey = it.next();
-        K second = it.next();
-        V firstValue = sm.get(first);
-        V fromKeyValue = sm.get(fromKey);
-        V secondValue = sm.get(second);
+        final SortedBidiMap<K, V> sm = makeFullMap();
+        final Iterator<K> it = sm.keySet().iterator();
+        final K first = it.next();
+        final K fromKey = it.next();
+        final K second = it.next();
+        final V firstValue = sm.get(first);
+        final V fromKeyValue = sm.get(fromKey);
+        final V secondValue = sm.get(second);
 
-        SortedMap<K, V> sub = sm.tailMap(fromKey);
+        final SortedMap<K, V> sub = sm.tailMap(fromKey);
         assertEquals(sm.size() - 1, sub.size());
         assertEquals(true, sm.containsKey(first));
         assertEquals(false, sub.containsKey(first));
@@ -308,20 +308,20 @@ public abstract class AbstractSortedBidi
         }
 
         // extra test as other tests get complex
-        SortedBidiMap<K, V> sm = makeFullMap();
-        Iterator<K> it = sm.keySet().iterator();
+        final SortedBidiMap<K, V> sm = makeFullMap();
+        final Iterator<K> it = sm.keySet().iterator();
         it.next();
         it.next();
-        K first = it.next();
-        K fromKey = it.next();
-        K second = it.next();
+        final K first = it.next();
+        final K fromKey = it.next();
+        final K second = it.next();
 
-        V firstValue = sm.get(first);
-        V fromKeyValue = sm.get(fromKey);
-        V secondValue = sm.get(second);
+        final V firstValue = sm.get(first);
+        final V fromKeyValue = sm.get(fromKey);
+        final V secondValue = sm.get(second);
 
-        SortedMap<K, V> sub = sm.tailMap(fromKey);
-        int size = sm.size();
+        final SortedMap<K, V> sub = sm.tailMap(fromKey);
+        final int size = sm.size();
         assertEquals(size - 3, sub.size());
         sub.clear();
         assertEquals(0, sub.size());
@@ -357,22 +357,22 @@ public abstract class AbstractSortedBidi
         }
 
         // extra test as other tests get complex
-        SortedBidiMap<K, V> sm = makeFullMap();
-        Iterator<K> it = sm.keySet().iterator();
+        final SortedBidiMap<K, V> sm = makeFullMap();
+        final Iterator<K> it = sm.keySet().iterator();
         it.next();
         it.next();
-        K fromKey = it.next();
-        K first = it.next();
-        K second = it.next();
+        final K fromKey = it.next();
+        final K first = it.next();
+        final K second = it.next();
 
-        int size = sm.size();
-        SortedMap<K, V> sub = sm.tailMap(fromKey);
+        final int size = sm.size();
+        final SortedMap<K, V> sub = sm.tailMap(fromKey);
         assertEquals(true, sm.containsKey(first));
         assertEquals(true, sub.containsKey(first));
         assertEquals(true, sm.containsKey(second));
         assertEquals(true, sub.containsKey(second));
 
-        Object firstValue = sub.remove(first);
+        final Object firstValue = sub.remove(first);
         assertEquals(size - 3, sub.size());
         assertEquals(size - 1, sm.size());
         assertEquals(size - 1, sm.inverseBidiMap().size());
@@ -383,7 +383,7 @@ public abstract class AbstractSortedBidi
         assertEquals(false, sub.containsKey(first));
         assertEquals(false, sub.containsValue(firstValue));
 
-        Object secondValue = sub.remove(second);
+        final Object secondValue = sub.remove(second);
         assertEquals(size - 4, sub.size());
         assertEquals(size - 2, sm.size());
         assertEquals(size - 2, sm.inverseBidiMap().size());
@@ -402,21 +402,21 @@ public abstract class AbstractSortedBidi
         }
 
         // extra test as other tests get complex
-        SortedBidiMap<K, V> sm = makeFullMap();
-        Iterator<K> it = sm.keySet().iterator();
+        final SortedBidiMap<K, V> sm = makeFullMap();
+        final Iterator<K> it = sm.keySet().iterator();
         it.next();
         it.next();
-        K fromKey = it.next();
-        K first = it.next();
-        K second = it.next();
-
-        int size = sm.size();
-        SortedMap<K, V> sub = sm.tailMap(fromKey);
-        Set<Map.Entry<K, V>> set = sub.entrySet();
-        Iterator<Map.Entry<K, V>> it2 = set.iterator();
+        final K fromKey = it.next();
+        final K first = it.next();
+        final K second = it.next();
+
+        final int size = sm.size();
+        final SortedMap<K, V> sub = sm.tailMap(fromKey);
+        final Set<Map.Entry<K, V>> set = sub.entrySet();
+        final Iterator<Map.Entry<K, V>> it2 = set.iterator();
         it2.next();
-        Map.Entry<K, V> firstEntry = cloneMapEntry(it2.next());
-        Map.Entry<K, V> secondEntry = cloneMapEntry(it2.next());
+        final Map.Entry<K, V> firstEntry = cloneMapEntry(it2.next());
+        final Map.Entry<K, V> secondEntry = cloneMapEntry(it2.next());
         assertEquals(true, sm.containsKey(first));
         assertEquals(true, sub.containsKey(first));
         assertEquals(true, set.contains(firstEntry));
@@ -453,19 +453,19 @@ public abstract class AbstractSortedBidi
     //-----------------------------------------------------------------------
     public void testBidiSubMapContains() {
         // extra test as other tests get complex
-        SortedBidiMap<K, V> sm = makeFullMap();
-        Iterator<K> it = sm.keySet().iterator();
-        K first = it.next();
-        K fromKey = it.next();
-        K second = it.next();
-        K toKey = it.next();
-        K third = it.next();
-        V firstValue = sm.get(first);
-        V fromKeyValue = sm.get(fromKey);
-        V secondValue = sm.get(second);
-        V thirdValue = sm.get(third);
+        final SortedBidiMap<K, V> sm = makeFullMap();
+        final Iterator<K> it = sm.keySet().iterator();
+        final K first = it.next();
+        final K fromKey = it.next();
+        final K second = it.next();
+        final K toKey = it.next();
+        final K third = it.next();
+        final V firstValue = sm.get(first);
+        final V fromKeyValue = sm.get(fromKey);
+        final V secondValue = sm.get(second);
+        final V thirdValue = sm.get(third);
 
-        SortedMap<K, V> sub = sm.subMap(fromKey, toKey);
+        final SortedMap<K, V> sub = sm.subMap(fromKey, toKey);
         assertEquals(2, sub.size());
         assertEquals(true, sm.containsKey(first));
         assertEquals(false, sub.containsKey(first));
@@ -492,21 +492,21 @@ public abstract class AbstractSortedBidi
         }
 
         // extra test as other tests get complex
-        SortedBidiMap<K, V> sm = makeFullMap();
-        Iterator<K> it = sm.keySet().iterator();
+        final SortedBidiMap<K, V> sm = makeFullMap();
+        final Iterator<K> it = sm.keySet().iterator();
         it.next();
-        K fromKey = it.next();
-        K first = it.next();
-        K second = it.next();
-        K toKey = it.next();
-
-        V fromKeyValue = sm.get(fromKey);
-        V firstValue = sm.get(first);
-        V secondValue = sm.get(second);
-        V toKeyValue = sm.get(toKey);
+        final K fromKey = it.next();
+        final K first = it.next();
+        final K second = it.next();
+        final K toKey = it.next();
+
+        final V fromKeyValue = sm.get(fromKey);
+        final V firstValue = sm.get(first);
+        final V secondValue = sm.get(second);
+        final V toKeyValue = sm.get(toKey);
 
-        SortedMap<K, V> sub = sm.subMap(fromKey, toKey);
-        int size = sm.size();
+        final SortedMap<K, V> sub = sm.subMap(fromKey, toKey);
+        final int size = sm.size();
         assertEquals(3, sub.size());
         sub.clear();
         assertEquals(0, sub.size());
@@ -549,23 +549,23 @@ public abstract class AbstractSortedBidi
         }
 
         // extra test as other tests get complex
-        SortedBidiMap<K, V> sm = makeFullMap();
-        Iterator<K> it = sm.keySet().iterator();
+        final SortedBidiMap<K, V> sm = makeFullMap();
+        final Iterator<K> it = sm.keySet().iterator();
         it.next();
         it.next();
-        K fromKey = it.next();
-        K first = it.next();
-        K second = it.next();
-        K toKey = it.next();
+        final K fromKey = it.next();
+        final K first = it.next();
+        final K second = it.next();
+        final K toKey = it.next();
 
-        int size = sm.size();
-        SortedMap<K, V> sub = sm.subMap(fromKey, toKey);
+        final int size = sm.size();
+        final SortedMap<K, V> sub = sm.subMap(fromKey, toKey);
         assertEquals(true, sm.containsKey(first));
         assertEquals(true, sub.containsKey(first));
         assertEquals(true, sm.containsKey(second));
         assertEquals(true, sub.containsKey(second));
 
-        V firstValue = sub.remove(first);
+        final V firstValue = sub.remove(first);
         assertEquals(2, sub.size());
         assertEquals(size - 1, sm.size());
         assertEquals(size - 1, sm.inverseBidiMap().size());
@@ -576,7 +576,7 @@ public abstract class AbstractSortedBidi
         assertEquals(false, sub.containsKey(first));
         assertEquals(false, sub.containsValue(firstValue));
 
-        V secondValue = sub.remove(second);
+        final V secondValue = sub.remove(second);
         assertEquals(1, sub.size());
         assertEquals(size - 2, sm.size());
         assertEquals(size - 2, sm.inverseBidiMap().size());
@@ -595,23 +595,23 @@ public abstract class AbstractSortedBidi
         }
 
         // extra test as other tests get complex
-        SortedBidiMap<K, V> sm = makeFullMap();
-        Iterator<K> it = sm.keySet().iterator();
+        final SortedBidiMap<K, V> sm = makeFullMap();
+        final Iterator<K> it = sm.keySet().iterator();
         it.next();
         it.next();
-        K fromKey = it.next();
-        K first = it.next();
-        K second = it.next();
-        K toKey = it.next();
-
-        int size = sm.size();
-        SortedMap<K, V> sub = sm.subMap(fromKey, toKey);
-        Set<Map.Entry<K, V>> set = sub.entrySet();
+        final K fromKey = it.next();
+        final K first = it.next();
+        final K second = it.next();
+        final K toKey = it.next();
+
+        final int size = sm.size();
+        final SortedMap<K, V> sub = sm.subMap(fromKey, toKey);
+        final Set<Map.Entry<K, V>> set = sub.entrySet();
         assertEquals(3, set.size());
-        Iterator<Map.Entry<K, V>> it2 = set.iterator();
+        final Iterator<Map.Entry<K, V>> it2 = set.iterator();
         it2.next();
-        Map.Entry<K, V> firstEntry = cloneMapEntry(it2.next());
-        Map.Entry<K, V> secondEntry = cloneMapEntry(it2.next());
+        final Map.Entry<K, V> firstEntry = cloneMapEntry(it2.next());
+        final Map.Entry<K, V> secondEntry = cloneMapEntry(it2.next());
         assertEquals(true, sm.containsKey(first));
         assertEquals(true, sub.containsKey(first));
         assertEquals(true, set.contains(firstEntry));

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



Mime
View raw message