commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1429905 [20/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/comparators/sequence/SequencesComparatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/comparators/sequence/SequencesComparatorTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/comparators/sequence/SequencesComparatorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/comparators/sequence/SequencesComparatorTest.java Mon Jan  7 17:15:14 2013
@@ -35,7 +35,7 @@ public class SequencesComparatorTest {
     @Test
     public void testLength() {
         for (int i = 0; i < before.size(); ++i) {
-            SequencesComparator<Character> comparator =
+            final SequencesComparator<Character> comparator =
                     new SequencesComparator<Character>(sequence(before.get(i)),
                             sequence(after.get(i)));
             Assert.assertEquals(length[i], comparator.getScript().getModifications());
@@ -44,7 +44,7 @@ public class SequencesComparatorTest {
 
     @Test
     public void testExecution() {
-        ExecutionVisitor<Character> ev = new ExecutionVisitor<Character>();
+        final ExecutionVisitor<Character> ev = new ExecutionVisitor<Character>();
         for (int i = 0; i < before.size(); ++i) {
             ev.setList(sequence(before.get(i)));
             new SequencesComparator<Character>(sequence(before.get(i)),
@@ -55,14 +55,14 @@ public class SequencesComparatorTest {
 
     @Test
     public void testMinimal() {
-        String[] shadokAlph = new String[] {
+        final String[] shadokAlph = new String[] {
             new String("GA"),
             new String("BU"),
             new String("ZO"),
             new String("MEU")
         };
-        List<String> sentenceBefore = new ArrayList<String>();
-        List<String> sentenceAfter  = new ArrayList<String>();
+        final List<String> sentenceBefore = new ArrayList<String>();
+        final List<String> sentenceAfter  = new ArrayList<String>();
         sentenceBefore.add(shadokAlph[0]);
         sentenceBefore.add(shadokAlph[2]);
         sentenceBefore.add(shadokAlph[3]);
@@ -84,7 +84,7 @@ public class SequencesComparatorTest {
         sentenceBefore.add(shadokAlph[0]);
         sentenceBefore.add(shadokAlph[3]);
 
-        Random random = new Random(4564634237452342L);
+        final Random random = new Random(4564634237452342L);
 
         for (int nbCom = 0; nbCom <= 40; nbCom+=5) {
             sentenceAfter.clear();
@@ -98,7 +98,7 @@ public class SequencesComparatorTest {
                 }
             }
 
-            SequencesComparator<String> comparator =
+            final SequencesComparator<String> comparator =
                     new SequencesComparator<String>(sentenceBefore, sentenceAfter);
             Assert.assertTrue(comparator.getScript().getModifications() <= nbCom);
         }
@@ -106,8 +106,8 @@ public class SequencesComparatorTest {
 
     @Test
     public void testShadok() {
-        int lgMax = 5;
-        String[] shadokAlph = new String[] {
+        final int lgMax = 5;
+        final String[] shadokAlph = new String[] {
             new String("GA"),
             new String("BU"),
             new String("ZO"),
@@ -115,11 +115,11 @@ public class SequencesComparatorTest {
         };
         List<List<String>> shadokSentences = new ArrayList<List<String>>();
         for (int lg=0; lg<lgMax; ++lg) {
-            List<List<String>> newTab = new ArrayList<List<String>>();
+            final List<List<String>> newTab = new ArrayList<List<String>>();
             newTab.add(new ArrayList<String>());
-            for (String element : shadokAlph) {
-                for (List<String> sentence : shadokSentences) {
-                    List<String> newSentence = new ArrayList<String>(sentence);
+            for (final String element : shadokAlph) {
+                for (final List<String> sentence : shadokSentences) {
+                    final List<String> newSentence = new ArrayList<String>(sentence);
                     newSentence.add(element);
                     newTab.add(newSentence);
                 }
@@ -127,7 +127,7 @@ public class SequencesComparatorTest {
             shadokSentences = newTab;
         }
 
-        ExecutionVisitor<String> ev = new ExecutionVisitor<String>();
+        final ExecutionVisitor<String> ev = new ExecutionVisitor<String>();
 
         for (int i = 0; i < shadokSentences.size(); ++i) {
             for (int j = 0; j < shadokSentences.size(); ++j) {
@@ -135,7 +135,7 @@ public class SequencesComparatorTest {
                 new SequencesComparator<String>(shadokSentences.get(i),
                         shadokSentences.get(j)).getScript().visit(ev);
 
-                StringBuilder concat = new StringBuilder();
+                final StringBuilder concat = new StringBuilder();
                 for (final String s : shadokSentences.get(j)) {
                     concat.append(s);
                 }
@@ -144,8 +144,8 @@ public class SequencesComparatorTest {
         }
     }
 
-    private List<Character> sequence(String string) {
-        List<Character> list = new ArrayList<Character>();
+    private List<Character> sequence(final String string) {
+        final List<Character> list = new ArrayList<Character>();
         for (int i = 0; i < string.length(); ++i) {
             list.add(new Character(string.charAt(i)));
         }
@@ -157,26 +157,26 @@ public class SequencesComparatorTest {
         private List<T> v;
         private int index;
 
-        public void setList(List<T> array) {
+        public void setList(final List<T> array) {
             v = new ArrayList<T>(array);
             index = 0;
         }
 
-        public void visitInsertCommand(T object) {
+        public void visitInsertCommand(final T object) {
             v.add(index++, object);
         }
 
-        public void visitKeepCommand(T object) {
+        public void visitKeepCommand(final T object) {
             ++index;
         }
 
-        public void visitDeleteCommand(T object) {
+        public void visitDeleteCommand(final T object) {
             v.remove(index);
         }
 
         public String getString() {
-            StringBuffer buffer = new StringBuffer();
-            for (T c : v) {
+            final StringBuffer buffer = new StringBuffer();
+            for (final T c : v) {
                 buffer.append(c);
             }
             return buffer.toString();

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/AbstractClosureTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/AbstractClosureTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/AbstractClosureTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/AbstractClosureTest.java Mon Jan  7 17:15:14 2013
@@ -24,7 +24,7 @@ public abstract class AbstractClosureTes
 
     @Test
     public void closureSanityTests() throws Exception {
-        Closure<?> closure = generateClosure();
+        final Closure<?> closure = generateClosure();
         Assert.assertNotNull(closure);
     }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/AbstractCompositePredicateTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/AbstractCompositePredicateTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/AbstractCompositePredicateTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/AbstractCompositePredicateTest.java Mon Jan  7 17:15:14 2013
@@ -71,7 +71,7 @@ public abstract class AbstractCompositeP
      */
     protected final Predicate<T> getPredicateInstance(final Boolean... mockReturnValues) {
         final List<Predicate<T>> predicates = new ArrayList<Predicate<T>>();
-        for (Boolean returnValue : mockReturnValues) {
+        for (final Boolean returnValue : mockReturnValues) {
             predicates.add(createMockPredicate(returnValue));
         }
         return getPredicateInstance(predicates);

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/AbstractMockPredicateTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/AbstractMockPredicateTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/AbstractMockPredicateTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/AbstractMockPredicateTest.java Mon Jan  7 17:15:14 2013
@@ -68,7 +68,7 @@ public abstract class AbstractMockPredic
     @After
     public final void verifyPredicates()
     {
-        for (Predicate<? super T> predicate : mockPredicatesToVerify) {
+        for (final Predicate<? super T> predicate : mockPredicatesToVerify) {
             verify(predicate);
         }
     }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/AbstractPredicateTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/AbstractPredicateTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/AbstractPredicateTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/AbstractPredicateTest.java Mon Jan  7 17:15:14 2013
@@ -35,7 +35,7 @@ public abstract class AbstractPredicateT
     
     @Test
     public void predicateSanityTests() throws Exception {
-        Predicate<?> predicate = generatePredicate();
+        final Predicate<?> predicate = generatePredicate();
         Assert.assertNotNull(predicate);
     }
 
@@ -44,11 +44,11 @@ public abstract class AbstractPredicateT
      */
     protected abstract Predicate<?> generatePredicate();
 
-    protected <T> void assertFalse(Predicate<T> predicate, T testObject) {
+    protected <T> void assertFalse(final Predicate<T> predicate, final T testObject) {
         Assert.assertFalse(predicate.evaluate(testObject));
     }
 
-    protected <T> void assertTrue(Predicate<T> predicate, T testObject) {
+    protected <T> void assertTrue(final Predicate<T> predicate, final T testObject) {
         Assert.assertTrue(predicate.evaluate(testObject));
     }
 }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/CatchAndRethrowClosureTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/CatchAndRethrowClosureTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/CatchAndRethrowClosureTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/CatchAndRethrowClosureTest.java Mon Jan  7 17:15:14 2013
@@ -29,7 +29,7 @@ public class CatchAndRethrowClosureTest 
         return new CatchAndRethrowClosure<T>() {
 
             @Override
-            protected void executeAndThrow(T input) throws IOException  {
+            protected void executeAndThrow(final T input) throws IOException  {
                 throw new IOException();
             }
         };
@@ -39,7 +39,7 @@ public class CatchAndRethrowClosureTest 
         return new CatchAndRethrowClosure<T>() {
 
             @Override
-            protected void executeAndThrow(T input) {
+            protected void executeAndThrow(final T input) {
                 throw new NullPointerException();
             }
         };
@@ -49,7 +49,7 @@ public class CatchAndRethrowClosureTest 
         return new CatchAndRethrowClosure<T>() {
 
             @Override
-            protected void executeAndThrow(T input) {
+            protected void executeAndThrow(final T input) {
             }
         };
     }
@@ -64,9 +64,9 @@ public class CatchAndRethrowClosureTest 
         Closure<Integer> closure = generateNoExceptionClosure();
         try {
             closure.execute(Integer.valueOf(0));
-        } catch (FunctorException ex) {
+        } catch (final FunctorException ex) {
             Assert.fail();
-        } catch (RuntimeException ex) {
+        } catch (final RuntimeException ex) {
             Assert.fail();
         }
         
@@ -74,9 +74,9 @@ public class CatchAndRethrowClosureTest 
         try {
             closure.execute(Integer.valueOf(0));
             Assert.fail();
-        } catch (FunctorException ex) {
+        } catch (final FunctorException ex) {
             Assert.assertTrue(ex.getCause() instanceof IOException);
-        } catch (RuntimeException ex) {
+        } catch (final RuntimeException ex) {
             Assert.fail();
         }
 
@@ -84,9 +84,9 @@ public class CatchAndRethrowClosureTest 
         try {
             closure.execute(Integer.valueOf(0));
             Assert.fail();
-        } catch (FunctorException ex) {
+        } catch (final FunctorException ex) {
             Assert.fail();
-        } catch (RuntimeException ex) {
+        } catch (final RuntimeException ex) {
             Assert.assertTrue(ex instanceof NullPointerException);
         }
     }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/ComparatorPredicateTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/ComparatorPredicateTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/ComparatorPredicateTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/ComparatorPredicateTest.java Mon Jan  7 17:15:14 2013
@@ -25,15 +25,15 @@ import org.junit.Test;
 
 public class ComparatorPredicateTest extends AbstractPredicateTest {
     private class TestComparator<T extends Comparable<T>> implements Comparator<T> {
-        public int compare(T first, T second) {
+        public int compare(final T first, final T second) {
             return first.compareTo(second);
         }
     }
 
     @Test
     public void compareEquals() {
-        Integer value = Integer.valueOf(10);
-        Predicate<Integer> p = comparatorPredicate(value, new TestComparator<Integer>());
+        final Integer value = Integer.valueOf(10);
+        final Predicate<Integer> p = comparatorPredicate(value, new TestComparator<Integer>());
         assertFalse(p, Integer.valueOf(value.intValue() - 1));
         assertTrue(p, Integer.valueOf(value.intValue()));
         assertFalse(p, Integer.valueOf(value.intValue() + 1));
@@ -41,8 +41,8 @@ public class ComparatorPredicateTest ext
 
     @Test
     public void compareGreater() {
-        Integer value = Integer.valueOf(10);
-        Predicate<Integer> p = comparatorPredicate(value, new TestComparator<Integer>(), Criterion.GREATER);
+        final Integer value = Integer.valueOf(10);
+        final Predicate<Integer> p = comparatorPredicate(value, new TestComparator<Integer>(), Criterion.GREATER);
         assertTrue(p, Integer.valueOf(value.intValue() - 1));
         assertFalse(p, Integer.valueOf(value.intValue()));
         assertFalse(p, Integer.valueOf(value.intValue() + 1));
@@ -50,8 +50,8 @@ public class ComparatorPredicateTest ext
 
     @Test
     public void compareLess() {
-        Integer value = Integer.valueOf(10);
-        Predicate<Integer> p = comparatorPredicate(value, new TestComparator<Integer>(), Criterion.LESS);
+        final Integer value = Integer.valueOf(10);
+        final Predicate<Integer> p = comparatorPredicate(value, new TestComparator<Integer>(), Criterion.LESS);
         assertFalse(p, Integer.valueOf(value.intValue() - 1));
         assertFalse(p, Integer.valueOf(value.intValue()));
         assertTrue(p, Integer.valueOf(value.intValue() + 1));
@@ -59,8 +59,8 @@ public class ComparatorPredicateTest ext
 
     @Test
     public void compareGreaterOrEqual() {
-        Integer value = Integer.valueOf(10);
-        Predicate<Integer> p = comparatorPredicate(value, new TestComparator<Integer>(), Criterion.GREATER_OR_EQUAL);
+        final Integer value = Integer.valueOf(10);
+        final Predicate<Integer> p = comparatorPredicate(value, new TestComparator<Integer>(), Criterion.GREATER_OR_EQUAL);
         assertTrue(p, Integer.valueOf(value.intValue() - 1));
         assertTrue(p, Integer.valueOf(value.intValue()));
         assertFalse(p, Integer.valueOf(value.intValue() + 1));
@@ -68,8 +68,8 @@ public class ComparatorPredicateTest ext
 
     @Test
     public void compareLessOrEqual() {
-        Integer value = Integer.valueOf(10);
-        Predicate<Integer> p = comparatorPredicate(value, new TestComparator<Integer>(), Criterion.LESS_OR_EQUAL);
+        final Integer value = Integer.valueOf(10);
+        final Predicate<Integer> p = comparatorPredicate(value, new TestComparator<Integer>(), Criterion.LESS_OR_EQUAL);
         assertFalse(p, Integer.valueOf(value.intValue() - 1));
         assertTrue(p, Integer.valueOf(value.intValue()));
         assertTrue(p, Integer.valueOf(value.intValue() + 1));

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/EqualPredicateTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/EqualPredicateTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/EqualPredicateTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/EqualPredicateTest.java Mon Jan  7 17:15:14 2013
@@ -40,7 +40,7 @@ public class EqualPredicateTest extends 
     
     @Test
     public void objectFactoryUsesEqualsForTest() throws Exception {
-        Predicate<EqualsTestObject> predicate = equalPredicate(FALSE_OBJECT);
+        final Predicate<EqualsTestObject> predicate = equalPredicate(FALSE_OBJECT);
         assertFalse(predicate, FALSE_OBJECT);
         assertTrue(equalPredicate(TRUE_OBJECT), TRUE_OBJECT);
     }
@@ -48,19 +48,19 @@ public class EqualPredicateTest extends 
     @SuppressWarnings("boxing")
     @Test
     public void testPredicateTypeCanBeSuperClassOfObject() throws Exception {
-        Predicate<Number> predicate = equalPredicate((Number) 4);
+        final Predicate<Number> predicate = equalPredicate((Number) 4);
         assertTrue(predicate, 4);
     }
 
     public static class EqualsTestObject {
         private final boolean b;
 
-        public EqualsTestObject(boolean b) {
+        public EqualsTestObject(final boolean b) {
             this.b = b;
         }
         
         @Override
-        public boolean equals(Object obj) {
+        public boolean equals(final Object obj) {
             return b;
         }
     }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/NullPredicateTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/NullPredicateTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/NullPredicateTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/functors/NullPredicateTest.java Mon Jan  7 17:15:14 2013
@@ -31,7 +31,7 @@ public class NullPredicateTest extends A
     }
     
     public void ensurePredicateCanBeTypedWithoutWarning() throws Exception {
-        Predicate<String> predicate = NullPredicate.nullPredicate();
+        final Predicate<String> predicate = NullPredicate.nullPredicate();
         assertFalse(predicate, cString);
     }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/AbstractIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/AbstractIteratorTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/AbstractIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/AbstractIteratorTest.java Mon Jan  7 17:15:14 2013
@@ -39,7 +39,7 @@ public abstract class AbstractIteratorTe
      * 
      * @param testName  the test class name
      */
-    public AbstractIteratorTest(String testName) {
+    public AbstractIteratorTest(final String testName) {
         super(testName);
     }
 
@@ -105,7 +105,7 @@ public abstract class AbstractIteratorTe
             return;
         }
 
-        Iterator<E> it = makeEmptyIterator();
+        final Iterator<E> it = makeEmptyIterator();
         
         // hasNext() should return false
         assertEquals("hasNext() should return false for empty iterators", false, it.hasNext());
@@ -114,7 +114,7 @@ public abstract class AbstractIteratorTe
         try {
             it.next();
             fail("NoSuchElementException must be thrown when Iterator is exhausted");
-        } catch (NoSuchElementException e) {
+        } catch (final NoSuchElementException e) {
         }
         verify();
         
@@ -129,7 +129,7 @@ public abstract class AbstractIteratorTe
             return;
         }
 
-        Iterator<E> it = makeObject();
+        final Iterator<E> it = makeObject();
 
         // hasNext() must be true (ensure makeFullIterator is correct!)
         assertEquals("hasNext() should return true for at least one element", true, it.hasNext());
@@ -137,7 +137,7 @@ public abstract class AbstractIteratorTe
         // next() must not throw exception (ensure makeFullIterator is correct!)
         try {
             it.next();
-        } catch (NoSuchElementException e) {
+        } catch (final NoSuchElementException e) {
             fail("Full iterators must have at least one element");
         }
 
@@ -151,7 +151,7 @@ public abstract class AbstractIteratorTe
         try {
             it.next();
             fail("NoSuchElementException must be thrown when Iterator is exhausted");
-        } catch (NoSuchElementException e) {
+        } catch (final NoSuchElementException e) {
         }
         
         assertNotNull(it.toString());
@@ -161,13 +161,13 @@ public abstract class AbstractIteratorTe
      * Test remove behaviour.
      */
     public void testRemove() {
-        Iterator<E> it = makeObject();
+        final Iterator<E> it = makeObject();
         
         if (supportsRemove() == false) {
             // check for UnsupportedOperationException if not supported
             try {
                 it.remove();
-            } catch (UnsupportedOperationException ex) {}
+            } catch (final UnsupportedOperationException ex) {}
             return;
         }
         
@@ -175,7 +175,7 @@ public abstract class AbstractIteratorTe
         try {
             it.remove();
             fail();
-        } catch (IllegalStateException ex) {}
+        } catch (final IllegalStateException ex) {}
         verify();
         
         // remove after next should be fine
@@ -186,7 +186,7 @@ public abstract class AbstractIteratorTe
         try {
             it.remove();
             fail();
-        } catch (IllegalStateException ex) {}
+        } catch (final IllegalStateException ex) {}
     }
     
 }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/AbstractListIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/AbstractListIteratorTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/AbstractListIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/AbstractListIteratorTest.java Mon Jan  7 17:15:14 2013
@@ -38,7 +38,7 @@ public abstract class AbstractListIterat
      *
      * @param testName  the test class name
      */
-    public AbstractListIteratorTest(String testName) {
+    public AbstractListIteratorTest(final String testName) {
         super(testName);
     }
 
@@ -96,7 +96,7 @@ public abstract class AbstractListIterat
             return;
         }
 
-        ListIterator<E> it = makeEmptyIterator();
+        final ListIterator<E> it = makeEmptyIterator();
 
         assertEquals(false, it.hasNext());
         assertEquals(0, it.nextIndex());
@@ -107,14 +107,14 @@ public abstract class AbstractListIterat
         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) {
         }
     }
 
@@ -122,8 +122,8 @@ public abstract class AbstractListIterat
      * Test navigation through the iterator.
      */
     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());
         }
@@ -134,7 +134,7 @@ public abstract class AbstractListIterat
         try {
             it.next();
             fail("NoSuchElementException must be thrown from next at end of ListIterator");
-        } catch (NoSuchElementException e) {
+        } catch (final NoSuchElementException e) {
         }
 
         // loop back through comparing
@@ -142,7 +142,7 @@ public abstract class AbstractListIterat
             assertEquals(i + 1, it.nextIndex());
             assertEquals(i, it.previousIndex());
 
-            Object obj = list.get(i);
+            final Object obj = list.get(i);
             assertEquals(obj, it.previous());
         }
 
@@ -152,7 +152,7 @@ public abstract class AbstractListIterat
         try {
             it.previous();
             fail("NoSuchElementException must be thrown from previous at start of ListIterator");
-        } catch (NoSuchElementException e) {
+        } catch (final NoSuchElementException e) {
         }
     }
 
@@ -162,12 +162,12 @@ public abstract class AbstractListIterat
     public void testAdd() {
         ListIterator<E> it = makeObject();
 
-        E addValue = addSetValue();
+        final E addValue = addSetValue();
         if (supportsAdd() == false) {
             // check for UnsupportedOperationException if not supported
             try {
                 it.add(addValue);
-            } catch (UnsupportedOperationException ex) {}
+            } catch (final UnsupportedOperationException ex) {}
             return;
         }
 
@@ -196,13 +196,13 @@ public abstract class AbstractListIterat
      * Test set behaviour.
      */
     public void testSet() {
-        ListIterator<E> it = makeObject();
+        final ListIterator<E> it = makeObject();
 
         if (supportsSet() == false) {
             // check for UnsupportedOperationException if not supported
             try {
                 it.set(addSetValue());
-            } catch (UnsupportedOperationException ex) {}
+            } catch (final UnsupportedOperationException ex) {}
             return;
         }
 
@@ -210,7 +210,7 @@ public abstract class AbstractListIterat
         try {
             it.set(addSetValue());
             fail();
-        } catch (IllegalStateException ex) {}
+        } catch (final IllegalStateException ex) {}
 
         // set after next should be fine
         it.next();
@@ -222,20 +222,20 @@ public abstract class AbstractListIterat
     }
 
     public void testRemoveThenSet() {
-        ListIterator<E> it = makeObject();
+        final ListIterator<E> it = makeObject();
         if (supportsRemove() && supportsSet()) {
             it.next();
             it.remove();
             try {
                 it.set(addSetValue());
                 fail("IllegalStateException must be thrown from set after remove");
-            } catch (IllegalStateException e) {
+            } catch (final IllegalStateException e) {
             }
         }
     }
 
     public void testAddThenSet() {
-        ListIterator<E> it = makeObject();
+        final ListIterator<E> it = makeObject();
         // add then set
         if (supportsAdd() && supportsSet()) {
             it.next();
@@ -243,7 +243,7 @@ public abstract class AbstractListIterat
             try {
                 it.set(addSetValue());
                 fail("IllegalStateException must be thrown from set after add");
-            } catch (IllegalStateException e) {
+            } catch (final IllegalStateException e) {
             }
         }
     }
@@ -252,7 +252,7 @@ public abstract class AbstractListIterat
      * Test remove after add behaviour.
      */
     public void testAddThenRemove() {
-        ListIterator<E> it = makeObject();
+        final ListIterator<E> it = makeObject();
 
         // add then remove
         if (supportsAdd() && supportsRemove()) {
@@ -261,7 +261,7 @@ public abstract class AbstractListIterat
             try {
                 it.remove();
                 fail("IllegalStateException must be thrown from remove after add");
-            } catch (IllegalStateException e) {
+            } catch (final IllegalStateException e) {
             }
         }
     }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/AbstractMapIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/AbstractMapIteratorTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/AbstractMapIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/AbstractMapIteratorTest.java Mon Jan  7 17:15:14 2013
@@ -41,7 +41,7 @@ public abstract class AbstractMapIterato
      *
      * @param testName  the test class name
      */
-    public AbstractMapIteratorTest(String testName) {
+    public AbstractMapIteratorTest(final String testName) {
         super(testName);
     }
 
@@ -116,40 +116,40 @@ public abstract class AbstractMapIterato
             return;
         }
 
-        MapIterator<K, V> it = makeEmptyIterator();
+        final MapIterator<K, V> it = makeEmptyIterator();
         assertEquals(false, it.hasNext());
 
         // next() should throw a NoSuchElementException
         try {
             it.next();
             fail();
-        } catch (NoSuchElementException ex) {}
+        } catch (final NoSuchElementException ex) {}
 
         // getKey() should throw an IllegalStateException
         try {
             it.getKey();
             fail();
-        } catch (IllegalStateException ex) {}
+        } catch (final IllegalStateException ex) {}
 
         // getValue() should throw an IllegalStateException
         try {
             it.getValue();
             fail();
-        } catch (IllegalStateException ex) {}
+        } catch (final IllegalStateException ex) {}
 
         if (supportsSetValue() == false) {
             // setValue() should throw an UnsupportedOperationException/IllegalStateException
             try {
                 it.setValue(addSetValues()[0]);
                 fail();
-            } catch (UnsupportedOperationException ex) {
-            } catch (IllegalStateException ex) {}
+            } catch (final UnsupportedOperationException ex) {
+            } catch (final IllegalStateException ex) {}
         } else {
             // setValue() should throw an IllegalStateException
             try {
                 it.setValue(addSetValues()[0]);
                 fail();
-            } catch (IllegalStateException ex) {}
+            } catch (final IllegalStateException ex) {}
         }
     }
 
@@ -162,21 +162,21 @@ public abstract class AbstractMapIterato
             return;
         }
 
-        MapIterator<K, V> it = makeObject();
-        Map<K, V> map = getMap();
+        final MapIterator<K, V> it = makeObject();
+        final Map<K, V> map = getMap();
         assertEquals(true, it.hasNext());
 
         assertEquals(true, it.hasNext());
-        Set<K> set = new HashSet<K>();
+        final Set<K> set = new HashSet<K>();
         while (it.hasNext()) {
             // getKey
-            K key = it.next();
+            final K key = it.next();
             assertSame("it.next() should equals getKey()", key, it.getKey());
             assertTrue("Key must be in map",  map.containsKey(key));
             assertTrue("Key must be unique", set.add(key));
 
             // getValue
-            V value = it.getValue();
+            final V value = it.getValue();
             if (isGetStructuralModify() == false) {
                 assertSame("Value must be mapped to key", map.get(key), value);
             }
@@ -192,23 +192,23 @@ public abstract class AbstractMapIterato
             return;
         }
 
-        V newValue = addSetValues()[0];
-        V newValue2 = addSetValues().length == 1 ? addSetValues()[0] : addSetValues()[1];
-        MapIterator<K, V> it = makeObject();
-        Map<K, V> map = getMap();
-        Map<K, V> confirmed = getConfirmedMap();
+        final V newValue = addSetValues()[0];
+        final V newValue2 = addSetValues().length == 1 ? addSetValues()[0] : addSetValues()[1];
+        final MapIterator<K, V> it = makeObject();
+        final Map<K, V> map = getMap();
+        final Map<K, V> confirmed = getConfirmedMap();
         assertEquals(true, it.hasNext());
-        K key = it.next();
-        V value = it.getValue();
+        final K key = it.next();
+        final V value = it.getValue();
 
         if (supportsSetValue() == false) {
             try {
                 it.setValue(newValue);
                 fail();
-            } catch (UnsupportedOperationException ex) {}
+            } catch (final UnsupportedOperationException ex) {}
             return;
         }
-        V old = it.setValue(newValue);
+        final V old = it.setValue(newValue);
         confirmed.put(key, newValue);
         assertSame("Key must not change after setValue", key, it.getKey());
         assertSame("Value must be changed after setValue", newValue, it.getValue());
@@ -236,17 +236,17 @@ public abstract class AbstractMapIterato
     //-----------------------------------------------------------------------
     @Override
     public void testRemove() { // override
-        MapIterator<K, V> it = makeObject();
-        Map<K, V> map = getMap();
-        Map<K, V> confirmed = getConfirmedMap();
+        final MapIterator<K, V> it = makeObject();
+        final Map<K, V> map = getMap();
+        final Map<K, V> confirmed = getConfirmedMap();
         assertEquals(true, it.hasNext());
-        K key = it.next();
+        final K key = it.next();
 
         if (supportsRemove() == false) {
             try {
                 it.remove();
                 fail();
-            } catch (UnsupportedOperationException ex) {
+            } catch (final UnsupportedOperationException ex) {
             }
             return;
         }
@@ -258,7 +258,7 @@ public abstract class AbstractMapIterato
 
         try {
             it.remove();  // second remove fails
-        } catch (IllegalStateException ex) {
+        } catch (final IllegalStateException ex) {
         }
         verify();
     }
@@ -268,12 +268,12 @@ public abstract class AbstractMapIterato
         if (supportsSetValue() == false || supportsRemove() == false) {
             return;
         }
-        V newValue = addSetValues()[0];
-        MapIterator<K, V> it = makeObject();
-        Map<K, V> confirmed = getConfirmedMap();
+        final V newValue = addSetValues()[0];
+        final MapIterator<K, V> it = makeObject();
+        final Map<K, V> confirmed = getConfirmedMap();
 
         assertEquals(true, it.hasNext());
-        K key = it.next();
+        final K key = it.next();
 
         it.setValue(newValue);
         it.remove();
@@ -283,7 +283,7 @@ public abstract class AbstractMapIterato
         try {
             it.setValue(newValue);
             fail();
-        } catch (IllegalStateException ex) {}
+        } catch (final IllegalStateException ex) {}
         verify();
     }
 
@@ -292,11 +292,11 @@ public abstract class AbstractMapIterato
         if (supportsRemove() == false) {
             return;
         }
-        MapIterator<K, V> it = makeObject();
-        Map<K, V> confirmed = getConfirmedMap();
+        final MapIterator<K, V> it = makeObject();
+        final Map<K, V> confirmed = getConfirmedMap();
 
         assertEquals(true, it.hasNext());
-        K key = it.next();
+        final K key = it.next();
 
         it.remove();
         confirmed.remove(key);
@@ -305,7 +305,7 @@ public abstract class AbstractMapIterato
         try {
             it.getKey();
             fail();
-        } catch (IllegalStateException ex) {}
+        } catch (final IllegalStateException ex) {}
         verify();
     }
 
@@ -314,11 +314,11 @@ public abstract class AbstractMapIterato
         if (supportsRemove() == false) {
             return;
         }
-        MapIterator<K, V> it = makeObject();
-        Map<K, V> confirmed = getConfirmedMap();
+        final MapIterator<K, V> it = makeObject();
+        final Map<K, V> confirmed = getConfirmedMap();
 
         assertEquals(true, it.hasNext());
-        K key = it.next();
+        final K key = it.next();
 
         it.remove();
         confirmed.remove(key);
@@ -327,7 +327,7 @@ public abstract class AbstractMapIterato
         try {
             it.getValue();
             fail();
-        } catch (IllegalStateException ex) {}
+        } catch (final IllegalStateException ex) {}
         verify();
     }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/AbstractOrderedMapIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/AbstractOrderedMapIteratorTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/AbstractOrderedMapIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/AbstractOrderedMapIteratorTest.java Mon Jan  7 17:15:14 2013
@@ -44,7 +44,7 @@ public abstract class AbstractOrderedMap
      *
      * @param testName  the test class name
      */
-    public AbstractOrderedMapIteratorTest(String testName) {
+    public AbstractOrderedMapIteratorTest(final String testName) {
         super(testName);
     }
 
@@ -67,12 +67,12 @@ public abstract class AbstractOrderedMap
 
         super.testEmptyMapIterator();
 
-        OrderedMapIterator<K, V> it = makeEmptyIterator();
+        final OrderedMapIterator<K, V> it = makeEmptyIterator();
         assertEquals(false, it.hasPrevious());
         try {
             it.previous();
             fail();
-        } catch (NoSuchElementException ex) {}
+        } catch (final NoSuchElementException ex) {}
     }
 
     //-----------------------------------------------------------------------
@@ -87,21 +87,21 @@ public abstract class AbstractOrderedMap
 
         super.testFullMapIterator();
 
-        OrderedMapIterator<K, V> it = makeObject();
-        Map<K, V> map = getMap();
+        final OrderedMapIterator<K, V> it = makeObject();
+        final Map<K, V> map = getMap();
 
         assertEquals(true, it.hasNext());
         assertEquals(false, it.hasPrevious());
-        Set<K> set = new HashSet<K>();
+        final Set<K> set = new HashSet<K>();
         while (it.hasNext()) {
             // getKey
-            K key = it.next();
+            final K key = it.next();
             assertSame("it.next() should equals getKey()", key, it.getKey());
             assertTrue("Key must be in map",  map.containsKey(key));
             assertTrue("Key must be unique", set.add(key));
 
             // getValue
-            V value = it.getValue();
+            final V value = it.getValue();
             if (isGetStructuralModify() == false) {
                 assertSame("Value must be mapped to key", map.get(key), value);
             }
@@ -113,13 +113,13 @@ public abstract class AbstractOrderedMap
         }
         while (it.hasPrevious()) {
             // getKey
-            Object key = it.previous();
+            final Object key = it.previous();
             assertSame("it.previous() should equals getKey()", key, it.getKey());
             assertTrue("Key must be in map",  map.containsKey(key));
             assertTrue("Key must be unique", set.remove(key));
 
             // getValue
-            Object value = it.getValue();
+            final Object value = it.getValue();
             if (isGetStructuralModify() == false) {
                 assertSame("Value must be mapped to key", map.get(key), value);
             }
@@ -140,23 +140,23 @@ public abstract class AbstractOrderedMap
             return;
         }
 
-        OrderedMapIterator<K, V> it = makeObject();
-        Map<K, V> map = getMap();
+        final OrderedMapIterator<K, V> it = makeObject();
+        final Map<K, V> map = getMap();
 
         assertEquals("keySet() not consistent", new ArrayList<K>(map.keySet()), new ArrayList<K>(map.keySet()));
 
-        Iterator<K> it2 = map.keySet().iterator();
+        final Iterator<K> it2 = map.keySet().iterator();
         assertEquals(true, it.hasNext());
         assertEquals(true, it2.hasNext());
-        List<K> list = new ArrayList<K>();
+        final List<K> list = new ArrayList<K>();
         while (it.hasNext()) {
-            K key = it.next();
+            final K key = it.next();
             assertEquals(it2.next(), key);
             list.add(key);
         }
         assertEquals(map.size(), list.size());
         while (it.hasPrevious()) {
-            K key = it.previous();
+            final K key = it.previous();
             assertEquals(list.get(list.size() - 1), key);
             list.remove(list.size() - 1);
         }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayIterator2Test.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayIterator2Test.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayIterator2Test.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayIterator2Test.java Mon Jan  7 17:15:14 2013
@@ -28,7 +28,7 @@ public class ArrayIterator2Test<E> exten
 
     protected int[] testArray = { 2, 4, 6, 8 };
 
-    public ArrayIterator2Test(String testName) {
+    public ArrayIterator2Test(final String testName) {
         super(testName);
     }
 
@@ -42,15 +42,15 @@ public class ArrayIterator2Test<E> exten
         return new ArrayIterator<E>(testArray);
     }
 
-    public ArrayIterator<E> makeArrayIterator(Object array) {
+    public ArrayIterator<E> makeArrayIterator(final Object array) {
         return new ArrayIterator<E>(array);
     }
 
-    public ArrayIterator<E> makeArrayIterator(Object array, int index) {
+    public ArrayIterator<E> makeArrayIterator(final Object array, final int index) {
         return new ArrayIterator<E>(array, index);
     }
 
-    public ArrayIterator<E> makeArrayIterator(Object array, int start, int end) {
+    public ArrayIterator<E> makeArrayIterator(final Object array, final int start, final int end) {
         return new ArrayIterator<E>(array, start, end);
     }
 
@@ -60,10 +60,10 @@ public class ArrayIterator2Test<E> exten
     }
 
     public void testIterator() {
-        Iterator<E> iter = makeObject();
-        for (int element : testArray) {
-            Integer testValue = new Integer(element);
-            Number iterValue = (Number) iter.next();
+        final Iterator<E> iter = makeObject();
+        for (final int element : testArray) {
+            final Integer testValue = new Integer(element);
+            final Number iterValue = (Number) iter.next();
 
             assertEquals("Iteration value is correct", testValue, iterValue);
         }
@@ -72,7 +72,7 @@ public class ArrayIterator2Test<E> exten
 
         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 ArrayIterator2Test<E> exten
     // proves that an ArrayIterator set with the constructor has the same number of elements
     // as an ArrayIterator set with setArray(Object)
     public void testSetArray() {
-        Iterator<E> iter1 = makeArrayIterator(testArray);
+        final Iterator<E> iter1 = makeArrayIterator(testArray);
         int count1 = 0;
         while (iter1.hasNext()) {
             ++count1;
@@ -91,7 +91,7 @@ public class ArrayIterator2Test<E> exten
 
         assertEquals("the count should be right using the constructor", count1, testArray.length);
 
-        ArrayIterator<E> iter2 = makeObject();
+        final ArrayIterator<E> iter2 = makeObject();
         iter2.setArray(testArray);
         int count2 = 0;
         while (iter2.hasNext()) {
@@ -127,35 +127,35 @@ public class ArrayIterator2Test<E> exten
         try {
             iter = makeArrayIterator(testArray, -1);
             fail("new ArrayIterator(Object,-1) should throw an ArrayIndexOutOfBoundsException");
-        } catch (ArrayIndexOutOfBoundsException aioobe) {
+        } catch (final ArrayIndexOutOfBoundsException aioobe) {
             // expected
         }
 
         try {
             iter = makeArrayIterator(testArray, testArray.length + 1);
             fail("new ArrayIterator(Object,length+1) should throw an ArrayIndexOutOfBoundsException");
-        } catch (ArrayIndexOutOfBoundsException aioobe) {
+        } catch (final ArrayIndexOutOfBoundsException aioobe) {
             // expected
         }
 
         try {
             iter = makeArrayIterator(testArray, 0, -1);
             fail("new ArrayIterator(Object,0,-1) should throw an ArrayIndexOutOfBoundsException");
-        } catch (ArrayIndexOutOfBoundsException aioobe) {
+        } catch (final ArrayIndexOutOfBoundsException aioobe) {
             // expected
         }
 
         try {
             iter = makeArrayIterator(testArray, 0, testArray.length + 1);
             fail("new ArrayIterator(Object,0,length+1) should throw an ArrayIndexOutOfBoundsException");
-        } catch (ArrayIndexOutOfBoundsException aioobe) {
+        } catch (final ArrayIndexOutOfBoundsException aioobe) {
             // expected
         }
 
         try {
             iter = makeArrayIterator(testArray, 1, 1);
             // expected not to fail
-        } catch (IllegalArgumentException iae) {
+        } catch (final IllegalArgumentException iae) {
             // MODIFIED: an iterator over a zero-length section of array
             //  should be perfectly legal behavior
             fail("new ArrayIterator(Object,1,1) should NOT throw an IllegalArgumentException");
@@ -164,7 +164,7 @@ public class ArrayIterator2Test<E> exten
         try {
             iter = makeArrayIterator(testArray, testArray.length - 1, testArray.length - 2);
             fail("new ArrayIterator(Object,length-2,length-1) should throw an IllegalArgumentException");
-        } catch (IllegalArgumentException iae) {
+        } catch (final IllegalArgumentException iae) {
             // expected
         }
     }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayIteratorTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayIteratorTest.java Mon Jan  7 17:15:14 2013
@@ -30,7 +30,7 @@ public class ArrayIteratorTest<E> extend
 
     protected String[] testArray = { "One", "Two", "Three" };
 
-    public ArrayIteratorTest(String testName) {
+    public ArrayIteratorTest(final String testName) {
         super(testName);
     }
 
@@ -50,9 +50,9 @@ public class ArrayIteratorTest<E> extend
     }
 
     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);
         }
@@ -61,7 +61,7 @@ public class ArrayIteratorTest<E> extend
 
         try {
             iter.next();
-        } catch (Exception e) {
+        } catch (final Exception e) {
             assertTrue(
                 "NoSuchElementException must be thrown",
                 e.getClass().equals(new NoSuchElementException().getClass()));
@@ -72,22 +72,22 @@ public class ArrayIteratorTest<E> extend
         try {
             new ArrayIterator<Object>(null);
             fail("Constructor should throw a NullPointerException when constructed with a null array");
-        } catch (NullPointerException e) {
+        } catch (final NullPointerException e) {
             // expected
         }
 
-        ArrayIterator<Object> iter = new ArrayIterator<Object>();
+        final ArrayIterator<Object> iter = new ArrayIterator<Object>();
         try {
             iter.setArray(null);
 
             fail("setArray(null) should throw a NullPointerException");
-        } catch (NullPointerException e) {
+        } catch (final NullPointerException e) {
             // expected
         }
     }
     
     public void testReset() {
-        ArrayIterator<E> it = makeObject();
+        final ArrayIterator<E> it = makeObject();
         it.next();
         it.reset();
         assertEquals("One", it.next());

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayListIterator2Test.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayListIterator2Test.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayListIterator2Test.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayListIterator2Test.java Mon Jan  7 17:15:14 2013
@@ -23,7 +23,7 @@ package org.apache.commons.collections.i
  */
 public class ArrayListIterator2Test<E> extends ArrayIterator2Test<E> {
 
-    public ArrayListIterator2Test(String testName) {
+    public ArrayListIterator2Test(final String testName) {
         super(testName);
     }
 
@@ -37,15 +37,15 @@ public class ArrayListIterator2Test<E> e
         return new ArrayListIterator<E>(testArray);
     }
 
-    public ArrayListIterator<E> makeArrayListIterator(Object array) {
+    public ArrayListIterator<E> makeArrayListIterator(final Object array) {
         return new ArrayListIterator<E>(array);
     }
 
-    public ArrayListIterator<E> makeArrayListIterator(Object array, int index) {
+    public ArrayListIterator<E> makeArrayListIterator(final Object array, final int index) {
         return new ArrayListIterator<E>(array, index);
     }
 
-    public ArrayListIterator<E> makeArrayListIterator(Object array, int start, int end) {
+    public ArrayListIterator<E> makeArrayListIterator(final Object array, final int start, final int end) {
         return new ArrayListIterator<E>(array, start, end);
     }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayListIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayListIteratorTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayListIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/ArrayListIteratorTest.java Mon Jan  7 17:15:14 2013
@@ -27,7 +27,7 @@ import java.util.NoSuchElementException;
  */
 public class ArrayListIteratorTest<E> extends ArrayIteratorTest<E> {
 
-    public ArrayListIteratorTest(String testName) {
+    public ArrayListIteratorTest(final String testName) {
         super(testName);
     }
 
@@ -41,7 +41,7 @@ public class ArrayListIteratorTest<E> ex
         return new ArrayListIterator<E>(testArray);
     }
 
-    public ArrayListIterator<E> makeArrayListIterator(Object array) {
+    public ArrayListIterator<E> makeArrayListIterator(final Object array) {
         return new ArrayListIterator<E>(array);
     }
 
@@ -55,7 +55,7 @@ public class ArrayListIteratorTest<E> ex
      * <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
@@ -66,8 +66,8 @@ public class ArrayListIteratorTest<E> ex
         }
 
         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);
         }
@@ -76,7 +76,7 @@ public class ArrayListIteratorTest<E> ex
 
         try {
             iter.previous();
-        } catch (Exception e) {
+        } catch (final Exception e) {
             assertTrue(
                 "NoSuchElementException must be thrown",
                 e.getClass().equals(new NoSuchElementException().getClass()));
@@ -89,9 +89,9 @@ public class ArrayListIteratorTest<E> ex
      */
     @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(testData);
         int x = 0;
@@ -110,9 +110,9 @@ public class ArrayListIteratorTest<E> ex
         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/CollatingIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/CollatingIteratorTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/CollatingIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/CollatingIteratorTest.java Mon Jan  7 17:15:14 2013
@@ -33,7 +33,7 @@ public class CollatingIteratorTest exten
 
     //------------------------------------------------------------ Conventional
 
-    public CollatingIteratorTest(String testName) {
+    public CollatingIteratorTest(final String testName) {
         super(testName);
     }
 
@@ -77,7 +77,7 @@ public class CollatingIteratorTest exten
 
     @Override
     public CollatingIterator<Integer> makeObject() {
-        CollatingIterator<Integer> iter = new CollatingIterator<Integer>(comparator);
+        final CollatingIterator<Integer> iter = new CollatingIterator<Integer>(comparator);
         iter.addIterator(evens.iterator());
         iter.addIterator(odds.iterator());
         iter.addIterator(fib.iterator());
@@ -87,7 +87,7 @@ public class CollatingIteratorTest exten
     //------------------------------------------------------------------- Tests
 
     public void testGetSetComparator() {
-        CollatingIterator<Integer> iter = new CollatingIterator<Integer>();
+        final CollatingIterator<Integer> iter = new CollatingIterator<Integer>();
         assertNull(iter.getComparator());
         iter.setComparator(comparator);
         assertSame(comparator, iter.getComparator());
@@ -96,7 +96,7 @@ public class CollatingIteratorTest exten
     }
 
     public void testIterateEven() {
-        CollatingIterator<Integer> iter = new CollatingIterator<Integer>(comparator);
+        final CollatingIterator<Integer> iter = new CollatingIterator<Integer>(comparator);
         iter.addIterator(evens.iterator());
         for (int i = 0; i < evens.size(); i++) {
             assertTrue(iter.hasNext());
@@ -107,7 +107,7 @@ public class CollatingIteratorTest exten
     }
 
     public void testIterateEvenOdd() {
-        CollatingIterator<Integer> iter = new CollatingIterator<Integer>(comparator, evens.iterator(), odds.iterator());
+        final CollatingIterator<Integer> iter = new CollatingIterator<Integer>(comparator, evens.iterator(), odds.iterator());
         for (int i = 0; i < 20; i++) {
             assertTrue(iter.hasNext());
             assertEquals(new Integer(i), iter.next());
@@ -117,7 +117,7 @@ public class CollatingIteratorTest exten
     }
 
     public void testIterateOddEven() {
-        CollatingIterator<Integer> iter = new CollatingIterator<Integer>(comparator, odds.iterator(), evens.iterator());
+        final CollatingIterator<Integer> iter = new CollatingIterator<Integer>(comparator, odds.iterator(), evens.iterator());
         for (int i = 0; i < 20; i++) {
             assertTrue(iter.hasNext());
             assertEquals(new Integer(i),iter.next());
@@ -127,7 +127,7 @@ public class CollatingIteratorTest exten
     }
 
     public void testIterateEvenEven() {
-        CollatingIterator<Integer> iter = new CollatingIterator<Integer>(comparator);
+        final CollatingIterator<Integer> iter = new CollatingIterator<Integer>(comparator);
         iter.addIterator(evens.iterator());
         iter.addIterator(evens.iterator());
         for (int i = 0; i < evens.size(); i++) {
@@ -142,7 +142,7 @@ public class CollatingIteratorTest exten
     }
 
     public void testIterateFibEvenOdd() {
-        CollatingIterator<Integer> iter = new CollatingIterator<Integer>(comparator);
+        final CollatingIterator<Integer> iter = new CollatingIterator<Integer>(comparator);
         iter.addIterator(fib.iterator());
         iter.addIterator(evens.iterator());
         iter.addIterator(odds.iterator());
@@ -208,12 +208,12 @@ public class CollatingIteratorTest exten
     }
 
     public void testRemoveFromSingle() {
-        CollatingIterator<Integer> iter = new CollatingIterator<Integer>(comparator);
+        final CollatingIterator<Integer> iter = new CollatingIterator<Integer>(comparator);
         iter.addIterator(evens.iterator());
         int expectedSize = evens.size();
         while (iter.hasNext()) {
-            Object o = iter.next();
-            Integer val = (Integer) o;
+            final Object o = iter.next();
+            final Integer val = (Integer) o;
             if (val.intValue() % 4 == 0) {
                 expectedSize--;
                 iter.remove();
@@ -223,13 +223,13 @@ public class CollatingIteratorTest exten
     }
 
     public void testRemoveFromDouble() {
-        CollatingIterator<Integer> iter = new CollatingIterator<Integer>(comparator);
+        final CollatingIterator<Integer> iter = new CollatingIterator<Integer>(comparator);
         iter.addIterator(evens.iterator());
         iter.addIterator(odds.iterator());
         int expectedSize = evens.size() + odds.size();
         while (iter.hasNext()) {
-            Object o = iter.next();
-            Integer val = (Integer) o;
+            final Object o = iter.next();
+            final Integer val = (Integer) o;
             if (val.intValue() % 4 == 0 || val.intValue() % 3 == 0) {
                 expectedSize--;
                 iter.remove();
@@ -239,21 +239,21 @@ public class CollatingIteratorTest exten
     }
 
     public void testNullComparator() {
-       List<Integer> l1 = Arrays.asList(1, 3, 5);
-       List<Integer> l2 = Arrays.asList(2, 4, 6);
+       final List<Integer> l1 = Arrays.asList(1, 3, 5);
+       final List<Integer> l2 = Arrays.asList(2, 4, 6);
 
-       CollatingIterator<Integer> collatingIterator1 = new CollatingIterator<Integer>(null, l1.iterator(), l2.iterator());
+       final CollatingIterator<Integer> collatingIterator1 = new CollatingIterator<Integer>(null, l1.iterator(), l2.iterator());
        try {
            collatingIterator1.next();
-       } catch (NullPointerException e) {
+       } catch (final NullPointerException e) {
            assertTrue(e.getMessage().startsWith("You must invoke setComparator"));
        }
 
        int i = 0;
-       CollatingIterator<Integer> collatingIterator2 = new CollatingIterator<Integer>(null, l1.iterator(), l2.iterator());
+       final CollatingIterator<Integer> collatingIterator2 = new CollatingIterator<Integer>(null, l1.iterator(), l2.iterator());
        collatingIterator2.setComparator(new ComparableComparator<Integer>());
        for ( ; collatingIterator2.hasNext(); i++ ) {
-          Integer n = collatingIterator2.next();
+          final Integer n = collatingIterator2.next();
           assertEquals("wrong order", (int)n, i + 1);
        }
        assertEquals("wrong size", i, l1.size() + l2.size());

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/FilterIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/FilterIteratorTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/FilterIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/FilterIteratorTest.java Mon Jan  7 17:15:14 2013
@@ -36,7 +36,7 @@ import org.apache.commons.collections.fu
 public class FilterIteratorTest<E> extends AbstractIteratorTest<E> {
 
     /** Creates new TestFilterIterator */
-    public FilterIteratorTest(String name) {
+    public FilterIteratorTest(final String name) {
         super(name);
     }
 
@@ -92,7 +92,7 @@ public class FilterIteratorTest<E> exten
     }
 
     public void testRepeatedNext() {
-        for (String element : array) {
+        for (final String element : array) {
             iterator.next();
         }
         verifyNoMoreElements();
@@ -115,10 +115,10 @@ public class FilterIteratorTest<E> exten
      */
     @SuppressWarnings("unchecked")
     public void testSetIterator() {
-        Iterator<E> iter1 = Collections.singleton((E) new Object()).iterator();
-        Iterator<E> iter2 = Collections.<E>emptyList().iterator();
+        final Iterator<E> iter1 = Collections.singleton((E) new Object()).iterator();
+        final Iterator<E> iter2 = Collections.<E>emptyList().iterator();
 
-        FilterIterator<E> filterIterator = new FilterIterator<E>(iter1);
+        final FilterIterator<E> filterIterator = new FilterIterator<E>(iter1);
         filterIterator.setPredicate(truePredicate());
         // this iterator has elements
         assertEquals(true, filterIterator.hasNext());
@@ -133,9 +133,9 @@ public class FilterIteratorTest<E> exten
      * correct response for the new predicate.
      */
     public void testSetPredicate() {
-        Iterator<E> iter = Collections.singleton((E) null).iterator();
+        final Iterator<E> iter = Collections.singleton((E) null).iterator();
 
-        FilterIterator<E> filterIterator = new FilterIterator<E>(iter);
+        final FilterIterator<E> filterIterator = new FilterIterator<E>(iter);
         filterIterator.setPredicate(truePredicate());
         // this predicate matches
         assertEquals(true, filterIterator.hasNext());
@@ -151,15 +151,15 @@ public class FilterIteratorTest<E> exten
             iterator.next();
             fail("NoSuchElementException expected");
         }
-        catch (NoSuchElementException e) {
+        catch (final NoSuchElementException e) {
             // success
         }
     }
 
     private void verifyElementsInPredicate(final String[] elements) {
-        Predicate<E> pred = new Predicate<E>() {
-            public boolean evaluate(E x) {
-                for (String element : elements) {
+        final Predicate<E> pred = new Predicate<E>() {
+            public boolean evaluate(final E x) {
+                for (final String element : elements) {
                     if (element.equals(x)) {
                         return true;
                     }
@@ -170,7 +170,7 @@ public class FilterIteratorTest<E> exten
         initIterator();
         iterator.setPredicate(pred);
         for (int i = 0; i < elements.length; i++) {
-            String s = (String)iterator.next();
+            final String s = (String)iterator.next();
             assertEquals(elements[i], s);
             assertTrue(i == elements.length - 1 ? !iterator.hasNext() : iterator.hasNext());
         }
@@ -180,7 +180,7 @@ public class FilterIteratorTest<E> exten
         initIterator();
         iterator.setPredicate(pred);
         if (iterator.hasNext()) {
-            Object last = iterator.next();
+            final Object last = iterator.next();
             iterator.remove();
             assertTrue("Base of FilterIterator still contains removed element.", !list.contains(last));
         }
@@ -197,9 +197,9 @@ public class FilterIteratorTest<E> exten
      * @param i      the Iterator to "filter"
      * @return "filtered" iterator
      */
-    protected FilterIterator<E> makePassThroughFilter(Iterator<E> i) {
-        Predicate<E> pred = new Predicate<E>() {
-                public boolean evaluate(E x) { return true; }
+    protected FilterIterator<E> makePassThroughFilter(final Iterator<E> i) {
+        final Predicate<E> pred = new Predicate<E>() {
+                public boolean evaluate(final E x) { return true; }
         };
         return new FilterIterator<E>(i, pred);
     }
@@ -211,9 +211,9 @@ public class FilterIteratorTest<E> exten
      * @param i      the Iterator to "filter"
      * @return "filtered" iterator
      */
-    protected FilterIterator<E> makeBlockAllFilter(Iterator<E> i) {
-        Predicate<E> pred = new Predicate<E>() {
-                public boolean evaluate(E x) { return false; }
+    protected FilterIterator<E> makeBlockAllFilter(final Iterator<E> i) {
+        final Predicate<E> pred = new Predicate<E>() {
+                public boolean evaluate(final E x) { return false; }
         };
         return new FilterIterator<E>(i, pred);
     }

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/FilterListIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/FilterListIteratorTest.java?rev=1429905&r1=1429904&r2=1429905&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/FilterListIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/iterators/FilterListIteratorTest.java Mon Jan  7 17:15:14 2013
@@ -35,7 +35,7 @@ import org.junit.Assert;
  */
 @SuppressWarnings("boxing")
 public class FilterListIteratorTest extends TestCase {
-    public FilterListIteratorTest(String testName) {
+    public FilterListIteratorTest(final String testName) {
         super(testName);
     }
 
@@ -51,7 +51,7 @@ public class FilterListIteratorTest exte
     private Predicate<Integer> oddPred = null;
     private Predicate<Integer> threePred = null;
     private Predicate<Integer> fourPred = null;
-    private Random random = new Random();
+    private final Random random = new Random();
 
     @Override
     public void setUp() {
@@ -71,37 +71,37 @@ public class FilterListIteratorTest exte
         }
 
         truePred = new Predicate<Integer>() {
-            public boolean evaluate(Integer x) { 
+            public boolean evaluate(final Integer x) { 
                 return true;
             }
         };
 
         falsePred = new Predicate<Integer>() {
-            public boolean evaluate(Integer x) { 
+            public boolean evaluate(final Integer x) { 
                 return true;
             }
         };
 
         evenPred = new Predicate<Integer>() {
-            public boolean evaluate(Integer x) { 
+            public boolean evaluate(final Integer x) { 
                 return x % 2 == 0;
             }
         };
 
         oddPred = new Predicate<Integer>() {
-            public boolean evaluate(Integer x) { 
+            public boolean evaluate(final Integer x) { 
                 return x % 2 == 1;
             }
         };
 
         threePred = new Predicate<Integer>() {
-            public boolean evaluate(Integer x) { 
+            public boolean evaluate(final Integer x) { 
                 return x % 3 == 0;
             }
         };
 
         fourPred = new Predicate<Integer>() {
-            public boolean evaluate(Integer x) { 
+            public boolean evaluate(final Integer x) { 
                 return x % 4 == 0;
             }
         };
@@ -131,7 +131,7 @@ public class FilterListIteratorTest exte
 
     public void testManual() {
         // do this one "by hand" as a sanity check
-        FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(list.listIterator(), threePred);
+        final FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(list.listIterator(), threePred);
         
         assertEquals(new Integer(0), filtered.next());
         assertEquals(new Integer(3), filtered.next());
@@ -189,37 +189,37 @@ public class FilterListIteratorTest exte
     }
 
     public void testTruePredicate() {
-        FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(list.listIterator(), truePred);
+        final FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(list.listIterator(), truePred);
         walkLists(list, filtered);
     }
     
     public void testFalsePredicate() {
-        FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(list.listIterator(), falsePred);
+        final FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(list.listIterator(), falsePred);
         walkLists(new ArrayList<Integer>(), filtered);
     }
 
     public void testEvens() {
-        FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(list.listIterator(), evenPred);
+        final FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(list.listIterator(), evenPred);
         walkLists(evens, filtered);
     }
     
     public void testOdds() {
-        FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(list.listIterator(), oddPred);
+        final FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(list.listIterator(), oddPred);
         walkLists(odds, filtered);
     }
 
     public void testThrees() {
-        FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(list.listIterator(), threePred);
+        final FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(list.listIterator(), threePred);
         walkLists(threes, filtered);
     }
 
     public void testFours() {
-        FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(list.listIterator(), fourPred);
+        final FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(list.listIterator(), fourPred);
         walkLists(fours, filtered);
     }
 
     public void testNestedSixes() {
-        FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(
+        final FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(
                                         new FilterListIterator<Integer>(list.listIterator(), threePred),
                                         evenPred
                                       );
@@ -227,7 +227,7 @@ public class FilterListIteratorTest exte
     }
 
     public void testNestedSixes2() {
-        FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(
+        final FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(
                                         new FilterListIterator<Integer>(list.listIterator(), evenPred),
                                         threePred
                                       );
@@ -235,7 +235,7 @@ public class FilterListIteratorTest exte
     }
 
     public void testNestedSixes3() {        
-        FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(
+        final FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(
                                         new FilterListIterator<Integer>(list.listIterator(), threePred),
                                         evenPred
                                       );
@@ -244,34 +244,34 @@ public class FilterListIteratorTest exte
 
     public void testNextChangesPrevious() {
         {
-            FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(list.listIterator(), threePred);
+            final FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(list.listIterator(), threePred);
             nextNextPrevious(threes.listIterator(), filtered);
         }
     
         {
-            FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(list.listIterator(), truePred);
+            final FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(list.listIterator(), truePred);
             nextNextPrevious(list.listIterator(), filtered);
         }
     }
 
     public void testPreviousChangesNext() {
         {
-            FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(list.listIterator(), threePred);
-            ListIterator<Integer> expected = threes.listIterator();
+            final FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(list.listIterator(), threePred);
+            final ListIterator<Integer> expected = threes.listIterator();
             walkForward(expected,filtered);
             previousPreviousNext(expected,filtered);
         }
         {
-            FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(list.listIterator(), truePred);
-            ListIterator<Integer> expected = list.listIterator();
+            final FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(list.listIterator(), truePred);
+            final ListIterator<Integer> expected = list.listIterator();
             walkForward(expected, filtered);
             previousPreviousNext(expected, filtered);
         }
     }
 
     public void testFailingHasNextBug() {
-        FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(list.listIterator(), fourPred);
-        ListIterator<Integer> expected = fours.listIterator();
+        final FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(list.listIterator(), fourPred);
+        final ListIterator<Integer> expected = fours.listIterator();
         while (expected.hasNext()) {
             expected.next();
             filtered.next();
@@ -285,17 +285,17 @@ public class FilterListIteratorTest exte
      * Test for {@link "https://issues.apache.org/jira/browse/COLLECTIONS-360 COLLECTIONS-360"}
      */
     public void testCollections360() throws Throwable {
-        Collection<Predicate<Object>> var7 = new GrowthList<Predicate<Object>>();
-        Predicate<Object> var9 = PredicateUtils.anyPredicate(var7);
-        FilterListIterator<Object> var13 = new FilterListIterator<Object>(var9);
+        final Collection<Predicate<Object>> var7 = new GrowthList<Predicate<Object>>();
+        final Predicate<Object> var9 = PredicateUtils.anyPredicate(var7);
+        final FilterListIterator<Object> var13 = new FilterListIterator<Object>(var9);
         Assert.assertFalse(var13.hasNext());
-        FilterListIterator<Object> var14 = new FilterListIterator<Object>(var9);
+        final FilterListIterator<Object> var14 = new FilterListIterator<Object>(var9);
         Assert.assertFalse(var14.hasPrevious());
     }
 
     // Utilities
 
-    private void walkForward(ListIterator<?> expected, ListIterator<?> testing) {
+    private void walkForward(final ListIterator<?> expected, final ListIterator<?> testing) {
         while (expected.hasNext()) {
             assertEquals(expected.nextIndex(), testing.nextIndex());
             assertEquals(expected.previousIndex(), testing.previousIndex());
@@ -304,7 +304,7 @@ public class FilterListIteratorTest exte
         }
     }
 
-    private void walkBackward(ListIterator<?> expected, ListIterator<?> testing) {
+    private void walkBackward(final ListIterator<?> expected, final ListIterator<?> testing) {
         while (expected.hasPrevious()) {
             assertEquals(expected.nextIndex(), testing.nextIndex());
             assertEquals(expected.previousIndex(), testing.previousIndex());
@@ -313,37 +313,37 @@ public class FilterListIteratorTest exte
         }
     }
 
-    private void nextNextPrevious(ListIterator<?> expected, ListIterator<?> testing) {
+    private void nextNextPrevious(final ListIterator<?> expected, final ListIterator<?> testing) {
         // calls to next() should change the value returned by previous()
         // even after previous() has been set by a call to hasPrevious()
         assertEquals(expected.next(), testing.next());
         assertEquals(expected.hasPrevious(), testing.hasPrevious());
-        Object expecteda = expected.next();
-        Object testinga = testing.next();
+        final Object expecteda = expected.next();
+        final Object testinga = testing.next();
         assertEquals(expecteda, testinga);
-        Object expectedb = expected.previous();
-        Object testingb = testing.previous();
+        final Object expectedb = expected.previous();
+        final Object testingb = testing.previous();
         assertEquals(expecteda, expectedb);
         assertEquals(testinga, testingb);
     }
 
-    private void previousPreviousNext(ListIterator<?> expected, ListIterator<?> testing) {
+    private void previousPreviousNext(final ListIterator<?> expected, final ListIterator<?> testing) {
         // calls to previous() should change the value returned by next()
         // even after next() has been set by a call to hasNext()
         assertEquals(expected.previous(), testing.previous());
         assertEquals(expected.hasNext(), testing.hasNext());
-        Object expecteda = expected.previous();
-        Object testinga = testing.previous();
+        final Object expecteda = expected.previous();
+        final Object testinga = testing.previous();
         assertEquals(expecteda, testinga);
-        Object expectedb = expected.next();
-        Object testingb = testing.next();
+        final Object expectedb = expected.next();
+        final Object testingb = testing.next();
         assertEquals(expecteda, testingb);
         assertEquals(expecteda, expectedb);
         assertEquals(testinga, testingb);
     }
 
-    private <E> void walkLists(List<E> list, ListIterator<E> testing) {
-        ListIterator<E> expected = list.listIterator();
+    private <E> void walkLists(final List<E> list, final ListIterator<E> testing) {
+        final ListIterator<E> expected = list.listIterator();
 
         // walk all the way forward
         walkForward(expected,testing);
@@ -402,7 +402,7 @@ public class FilterListIteratorTest exte
         }
 
         // random walk
-        StringBuilder walkdescr = new StringBuilder(500);
+        final StringBuilder walkdescr = new StringBuilder(500);
         for (int i = 0; i < 500; i++) {
             if (random.nextBoolean()) {
                 // step forward



Mime
View raw message