You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2013/01/22 08:09:49 UTC

svn commit: r1436770 [10/16] - in /commons/proper/lang/trunk/src: main/java/org/apache/commons/lang3/ main/java/org/apache/commons/lang3/builder/ main/java/org/apache/commons/lang3/concurrent/ main/java/org/apache/commons/lang3/event/ main/java/org/apa...

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java?rev=1436770&r1=1436769&r2=1436770&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java (original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java Tue Jan 22 07:09:45 2013
@@ -100,7 +100,7 @@ public class ToStringBuilderTest {
      */
     @Test
     public void testReflectionCharacter() {
-        Character c = new Character('A');
+        final Character c = new Character('A');
         assertEquals(this.toBaseString(c) + "[value=A]", ToStringBuilder.reflectionToString(c));
     }
 
@@ -154,7 +154,7 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionObjectArray() {
         Object[] array = new Object[] { null, base, new int[] { 3, 6 } };
-        String baseStr = this.toBaseString(array);
+        final String baseStr = this.toBaseString(array);
         assertEquals(baseStr + "[{<null>,5,{3,6}}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
@@ -163,7 +163,7 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionLongArray() {
         long[] array = new long[] { 1, 2, -3, 4 };
-        String baseStr = this.toBaseString(array);
+        final String baseStr = this.toBaseString(array);
         assertEquals(baseStr + "[{1,2,-3,4}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
@@ -172,7 +172,7 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionIntArray() {
         int[] array = new int[] { 1, 2, -3, 4 };
-        String baseStr = this.toBaseString(array);
+        final String baseStr = this.toBaseString(array);
         assertEquals(baseStr + "[{1,2,-3,4}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
@@ -181,7 +181,7 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionShortArray() {
         short[] array = new short[] { 1, 2, -3, 4 };
-        String baseStr = this.toBaseString(array);
+        final String baseStr = this.toBaseString(array);
         assertEquals(baseStr + "[{1,2,-3,4}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
@@ -190,7 +190,7 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionyteArray() {
         byte[] array = new byte[] { 1, 2, -3, 4 };
-        String baseStr = this.toBaseString(array);
+        final String baseStr = this.toBaseString(array);
         assertEquals(baseStr + "[{1,2,-3,4}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
@@ -199,7 +199,7 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionCharArray() {
         char[] array = new char[] { 'A', '2', '_', 'D' };
-        String baseStr = this.toBaseString(array);
+        final String baseStr = this.toBaseString(array);
         assertEquals(baseStr + "[{A,2,_,D}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
@@ -208,7 +208,7 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionDoubleArray() {
         double[] array = new double[] { 1.0, 2.9876, -3.00001, 4.3 };
-        String baseStr = this.toBaseString(array);
+        final String baseStr = this.toBaseString(array);
         assertEquals(baseStr + "[{1.0,2.9876,-3.00001,4.3}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
@@ -217,7 +217,7 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionFloatArray() {
         float[] array = new float[] { 1.0f, 2.9876f, -3.00001f, 4.3f };
-        String baseStr = this.toBaseString(array);
+        final String baseStr = this.toBaseString(array);
         assertEquals(baseStr + "[{1.0,2.9876,-3.00001,4.3}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
@@ -226,7 +226,7 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionBooleanArray() {
         boolean[] array = new boolean[] { true, false, false };
-        String baseStr = this.toBaseString(array);
+        final String baseStr = this.toBaseString(array);
         assertEquals(baseStr + "[{true,false,false}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
@@ -237,7 +237,7 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionFloatArrayArray() {
         float[][] array = new float[][] { { 1.0f, 2.29686f }, null, { Float.NaN } };
-        String baseStr = this.toBaseString(array);
+        final String baseStr = this.toBaseString(array);
         assertEquals(baseStr + "[{{1.0,2.29686},<null>,{NaN}}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
@@ -247,7 +247,7 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionLongArrayArray() {
         long[][] array = new long[][] { { 1, 2 }, null, { 5 } };
-        String baseStr = this.toBaseString(array);
+        final String baseStr = this.toBaseString(array);
         assertEquals(baseStr + "[{{1,2},<null>,{5}}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
@@ -256,7 +256,7 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionIntArrayArray() {
         int[][] array = new int[][] { { 1, 2 }, null, { 5 } };
-        String baseStr = this.toBaseString(array);
+        final String baseStr = this.toBaseString(array);
         assertEquals(baseStr + "[{{1,2},<null>,{5}}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
@@ -265,7 +265,7 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionhortArrayArray() {
         short[][] array = new short[][] { { 1, 2 }, null, { 5 } };
-        String baseStr = this.toBaseString(array);
+        final String baseStr = this.toBaseString(array);
         assertEquals(baseStr + "[{{1,2},<null>,{5}}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
@@ -274,7 +274,7 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionByteArrayArray() {
         byte[][] array = new byte[][] { { 1, 2 }, null, { 5 } };
-        String baseStr = this.toBaseString(array);
+        final String baseStr = this.toBaseString(array);
         assertEquals(baseStr + "[{{1,2},<null>,{5}}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
@@ -283,7 +283,7 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionCharArrayArray() {
         char[][] array = new char[][] { { 'A', 'B' }, null, { 'p' } };
-        String baseStr = this.toBaseString(array);
+        final String baseStr = this.toBaseString(array);
         assertEquals(baseStr + "[{{A,B},<null>,{p}}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
@@ -292,7 +292,7 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionDoubleArrayArray() {
         double[][] array = new double[][] { { 1.0, 2.29686 }, null, { Double.NaN } };
-        String baseStr = this.toBaseString(array);
+        final String baseStr = this.toBaseString(array);
         assertEquals(baseStr + "[{{1.0,2.29686},<null>,{NaN}}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
@@ -301,7 +301,7 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionBooleanArrayArray() {
         boolean[][] array = new boolean[][] { { true, false }, null, { false } };
-        String baseStr = this.toBaseString(array);
+        final String baseStr = this.toBaseString(array);
         assertEquals(baseStr + "[{{true,false},<null>,{false}}]", ToStringBuilder.reflectionToString(array));
         assertEquals(baseStr + "[{{true,false},<null>,{false}}]", ToStringBuilder.reflectionToString(array));
         array = null;
@@ -311,19 +311,19 @@ public class ToStringBuilderTest {
     // Reflection hierarchy tests
     @Test
     public void testReflectionHierarchyArrayList() {
-        List<Object> base = new ArrayList<Object>();
-        String baseStr = this.toBaseString(base);
+        final List<Object> base = new ArrayList<Object>();
+        final String baseStr = this.toBaseString(base);
         // note, the test data depends on the internal representation of the ArrayList, which may differ between JDK versions and vendors
-        String expectedWithTransients = baseStr + "[elementData={<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>},size=0,modCount=0]";
-        String toStringWithTransients = ToStringBuilder.reflectionToString(base, null, true);
+        final String expectedWithTransients = baseStr + "[elementData={<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>},size=0,modCount=0]";
+        final String toStringWithTransients = ToStringBuilder.reflectionToString(base, null, true);
         if (!expectedWithTransients.equals(toStringWithTransients)) {
             // representation different for IBM JDK 1.6.0, LANG-727
             if (!("IBM Corporation".equals(SystemUtils.JAVA_VENDOR) && "1.6".equals(SystemUtils.JAVA_SPECIFICATION_VERSION))) {
                 assertEquals(expectedWithTransients, toStringWithTransients);
             }
         }
-        String expectedWithoutTransients = baseStr + "[size=0]";
-        String toStringWithoutTransients = ToStringBuilder.reflectionToString(base, null, false);
+        final String expectedWithoutTransients = baseStr + "[size=0]";
+        final String toStringWithoutTransients = ToStringBuilder.reflectionToString(base, null, false);
         if (!expectedWithoutTransients.equals(toStringWithoutTransients)) {
             // representation different for IBM JDK 1.6.0, LANG-727
             if (!("IBM Corporation".equals(SystemUtils.JAVA_VENDOR) && "1.6".equals(SystemUtils.JAVA_SPECIFICATION_VERSION))) {
@@ -334,7 +334,7 @@ public class ToStringBuilderTest {
 
     @Test
     public void testReflectionHierarchy() {
-        ReflectionTestFixtureA baseA = new ReflectionTestFixtureA();
+        final ReflectionTestFixtureA baseA = new ReflectionTestFixtureA();
         String baseStr = this.toBaseString(baseA);
         assertEquals(baseStr + "[a=a]", ToStringBuilder.reflectionToString(baseA));
         assertEquals(baseStr + "[a=a]", ToStringBuilder.reflectionToString(baseA, null));
@@ -344,7 +344,7 @@ public class ToStringBuilderTest {
         assertEquals(baseStr + "[a=a]", ToStringBuilder.reflectionToString(baseA, null, false, Object.class));
         assertEquals(baseStr + "[a=a]", ToStringBuilder.reflectionToString(baseA, null, false, ReflectionTestFixtureA.class));
 
-        ReflectionTestFixtureB baseB = new ReflectionTestFixtureB();
+        final ReflectionTestFixtureB baseB = new ReflectionTestFixtureB();
         baseStr = this.toBaseString(baseB);
         assertEquals(baseStr + "[b=b,a=a]", ToStringBuilder.reflectionToString(baseB));
         assertEquals(baseStr + "[b=b,a=a]", ToStringBuilder.reflectionToString(baseB));
@@ -373,7 +373,7 @@ public class ToStringBuilderTest {
 
     @Test
     public void testInnerClassReflection() {
-        Outer outer = new Outer();
+        final Outer outer = new Outer();
         assertEquals(toBaseString(outer) + "[inner=" + toBaseString(outer.inner) + "[]]", outer.toString());
     }
 
@@ -398,7 +398,7 @@ public class ToStringBuilderTest {
      */
     @Test
     public void testReflectionArrayCycle() throws Exception {
-        Object[] objects = new Object[1];
+        final Object[] objects = new Object[1];
         objects[0] = objects;
         assertEquals(
             this.toBaseString(objects) + "[{" + this.toBaseString(objects) + "}]",
@@ -410,8 +410,8 @@ public class ToStringBuilderTest {
      */
     @Test
     public void testReflectionArrayCycleLevel2() throws Exception {
-        Object[] objects = new Object[1];
-        Object[] objectsLevel2 = new Object[1];
+        final Object[] objects = new Object[1];
+        final Object[] objectsLevel2 = new Object[1];
         objects[0] = objectsLevel2;
         objectsLevel2[0] = objects;
         assertEquals(
@@ -424,12 +424,12 @@ public class ToStringBuilderTest {
 
     @Test
     public void testReflectionArrayArrayCycle() throws Exception {
-        Object[][] objects = new Object[2][2];
+        final Object[][] objects = new Object[2][2];
         objects[0][0] = objects;
         objects[0][1] = objects;
         objects[1][0] = objects;
         objects[1][1] = objects;
-        String basicToString = this.toBaseString(objects);
+        final String basicToString = this.toBaseString(objects);
         assertEquals(
             basicToString
                 + "[{{"
@@ -528,7 +528,7 @@ public class ToStringBuilderTest {
      */
     @Test
     public void testSimpleReflectionObjectCycle() throws Exception {
-        SimpleReflectionTestFixture simple = new SimpleReflectionTestFixture();
+        final SimpleReflectionTestFixture simple = new SimpleReflectionTestFixture();
         simple.o = simple;
         assertEquals(this.toBaseString(simple) + "[o=" + this.toBaseString(simple) + "]", simple.toString());
     }
@@ -540,7 +540,7 @@ public class ToStringBuilderTest {
      */
     @Test
     public void testSelfInstanceVarReflectionObjectCycle() throws Exception {
-        SelfInstanceVarReflectionTestFixture test = new SelfInstanceVarReflectionTestFixture();
+        final SelfInstanceVarReflectionTestFixture test = new SelfInstanceVarReflectionTestFixture();
         assertEquals(this.toBaseString(test) + "[typeIsSelf=" + this.toBaseString(test) + "]", test.toString());
     }
 
@@ -552,7 +552,7 @@ public class ToStringBuilderTest {
      */
     @Test
     public void testSelfInstanceTwoVarsReflectionObjectCycle() throws Exception {
-        SelfInstanceTwoVarsReflectionTestFixture test = new SelfInstanceTwoVarsReflectionTestFixture();
+        final SelfInstanceTwoVarsReflectionTestFixture test = new SelfInstanceTwoVarsReflectionTestFixture();
         assertEquals(this.toBaseString(test) + "[typeIsSelf=" + this.toBaseString(test) + ",otherType=" + test.getOtherType().toString() + "]", test.toString());
     }
 
@@ -564,8 +564,8 @@ public class ToStringBuilderTest {
      */
     @Test
     public void testReflectionObjectCycle() throws Exception {
-        ReflectionTestCycleA a = new ReflectionTestCycleA();
-        ReflectionTestCycleB b = new ReflectionTestCycleB();
+        final ReflectionTestCycleA a = new ReflectionTestCycleA();
+        final ReflectionTestCycleB b = new ReflectionTestCycleB();
         a.b = b;
         b.a = a;
         assertEquals(
@@ -581,8 +581,8 @@ public class ToStringBuilderTest {
      */
     @Test
     public void testReflectionArrayAndObjectCycle() throws Exception {
-        Object[] objects = new Object[1];
-        SimpleReflectionTestFixture simple = new SimpleReflectionTestFixture(objects);
+        final Object[] objects = new Object[1];
+        final SimpleReflectionTestFixture simple = new SimpleReflectionTestFixture(objects);
         objects[0] = simple;
         assertEquals(
             this.toBaseString(objects)
@@ -629,8 +629,8 @@ public class ToStringBuilderTest {
 
     @Test
     public void testObject() {
-        Integer i3 = Integer.valueOf(3);
-        Integer i4 = Integer.valueOf(4);
+        final Integer i3 = Integer.valueOf(3);
+        final Integer i4 = Integer.valueOf(4);
         assertEquals(baseStr + "[<null>]", new ToStringBuilder(base).append((Object) null).toString());
         assertEquals(baseStr + "[3]", new ToStringBuilder(base).append(i3).toString());
         assertEquals(baseStr + "[a=<null>]", new ToStringBuilder(base).append("a", (Object) null).toString());
@@ -647,8 +647,8 @@ public class ToStringBuilderTest {
     
     @Test
     public void testObjectBuild() {
-        Integer i3 = Integer.valueOf(3);
-        Integer i4 = Integer.valueOf(4);
+        final Integer i3 = Integer.valueOf(3);
+        final Integer i4 = Integer.valueOf(4);
         assertEquals(baseStr + "[<null>]", new ToStringBuilder(base).append((Object) null).build());
         assertEquals(baseStr + "[3]", new ToStringBuilder(base).append(i3).build());
         assertEquals(baseStr + "[a=<null>]", new ToStringBuilder(base).append("a", (Object) null).build());
@@ -894,12 +894,12 @@ public class ToStringBuilderTest {
 
     @Test
     public void testObjectCycle() {
-        ObjectCycle a = new ObjectCycle();
-        ObjectCycle b = new ObjectCycle();
+        final ObjectCycle a = new ObjectCycle();
+        final ObjectCycle b = new ObjectCycle();
         a.obj = b;
         b.obj = a;
 
-        String expected = toBaseString(a) + "[" + toBaseString(b) + "[" + toBaseString(a) + "]]";
+        final String expected = toBaseString(a) + "[" + toBaseString(b) + "[" + toBaseString(a) + "]]";
         assertEquals(expected, a.toString());
     }
 
@@ -914,7 +914,7 @@ public class ToStringBuilderTest {
 
     @Test
     public void testSimpleReflectionStatics() {
-        SimpleReflectionStaticFieldsFixture instance1 = new SimpleReflectionStaticFieldsFixture();
+        final SimpleReflectionStaticFieldsFixture instance1 = new SimpleReflectionStaticFieldsFixture();
         assertEquals(
             this.toBaseString(instance1) + "[staticString=staticString,staticInt=12345]",
             ReflectionToStringBuilder.toString(instance1, null, false, true, SimpleReflectionStaticFieldsFixture.class));
@@ -934,7 +934,7 @@ public class ToStringBuilderTest {
      */
     @Test
     public void testReflectionStatics() {
-        ReflectionStaticFieldsFixture instance1 = new ReflectionStaticFieldsFixture();
+        final ReflectionStaticFieldsFixture instance1 = new ReflectionStaticFieldsFixture();
         assertEquals(
             this.toBaseString(instance1) + "[staticString=staticString,staticInt=12345,instanceString=instanceString,instanceInt=67890]",
             ReflectionToStringBuilder.toString(instance1, null, false, true, ReflectionStaticFieldsFixture.class));
@@ -954,7 +954,7 @@ public class ToStringBuilderTest {
      */
     @Test
     public void testInheritedReflectionStatics() {
-        InheritedReflectionStaticFieldsFixture instance1 = new InheritedReflectionStaticFieldsFixture();
+        final InheritedReflectionStaticFieldsFixture instance1 = new InheritedReflectionStaticFieldsFixture();
         assertEquals(
             this.toBaseString(instance1) + "[staticString2=staticString2,staticInt2=67890]",
             ReflectionToStringBuilder.toString(instance1, null, false, true, InheritedReflectionStaticFieldsFixture.class));
@@ -1003,8 +1003,8 @@ public class ToStringBuilderTest {
      */
     @Test
     public void test_setUpToClass_valid() {
-        Integer val = Integer.valueOf(5);
-        ReflectionToStringBuilder test = new ReflectionToStringBuilder(val);
+        final Integer val = Integer.valueOf(5);
+        final ReflectionToStringBuilder test = new ReflectionToStringBuilder(val);
         test.setUpToClass(Number.class);
         test.toString();
     }
@@ -1014,8 +1014,8 @@ public class ToStringBuilderTest {
      */
     @Test(expected=IllegalArgumentException.class)
     public void test_setUpToClass_invalid() {
-        Integer val = Integer.valueOf(5);
-        ReflectionToStringBuilder test = new ReflectionToStringBuilder(val);
+        final Integer val = Integer.valueOf(5);
+        final ReflectionToStringBuilder test = new ReflectionToStringBuilder(val);
         try {
             test.setUpToClass(String.class);
         } finally {
@@ -1072,8 +1072,8 @@ public class ToStringBuilderTest {
 
     @Test
     public void testAppendToStringUsingMultiLineStyle() {
-        MultiLineTestObject obj = new MultiLineTestObject();
-        ToStringBuilder testBuilder = new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+        final MultiLineTestObject obj = new MultiLineTestObject();
+        final ToStringBuilder testBuilder = new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                                           .appendToString(obj.toString());
         assertEquals(testBuilder.toString().indexOf("testInt=31337"), -1);
     }

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringStyleConcurrencyTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringStyleConcurrencyTest.java?rev=1436770&r1=1436769&r2=1436770&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringStyleConcurrencyTest.java (original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringStyleConcurrencyTest.java Tue Jan 22 07:09:45 2013
@@ -89,7 +89,7 @@ public class ToStringStyleConcurrencyTes
         // Create a thread pool with two threads to cause the most contention on the underlying resource.
         final ExecutorService threadPool = Executors.newFixedThreadPool(2);
         // Consumes toStrings
-        Callable<Integer> consumer = new Callable<Integer>() {
+        final Callable<Integer> consumer = new Callable<Integer>() {
             @Override
             public Integer call() {
                 for (int i = 0; i < REPEAT; i++) {
@@ -99,11 +99,11 @@ public class ToStringStyleConcurrencyTes
                 return Integer.valueOf(REPEAT);
             }
         };
-        Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();
+        final Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();
         tasks.add(consumer);
         tasks.add(consumer);
         final List<Future<Integer>> futures = threadPool.invokeAll(tasks);
-        for (Future<Integer> future : futures) {
+        for (final Future<Integer> future : futures) {
             future.get();
         }
     }

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringStyleTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringStyleTest.java?rev=1436770&r1=1436769&r2=1436770&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringStyleTest.java (original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringStyleTest.java Tue Jan 22 07:09:45 2013
@@ -33,84 +33,84 @@ public class ToStringStyleTest {
     //-----------------------------------------------------------------------
     @Test
     public void testSetArrayStart() {
-        ToStringStyle style = new ToStringStyleImpl();
+        final ToStringStyle style = new ToStringStyleImpl();
         style.setArrayStart(null);
         assertEquals("", style.getArrayStart());
     }
 
     @Test
     public void testSetArrayEnd() {
-        ToStringStyle style = new ToStringStyleImpl();
+        final ToStringStyle style = new ToStringStyleImpl();
         style.setArrayEnd(null);
         assertEquals("", style.getArrayEnd());
     }
 
     @Test
     public void testSetArraySeparator() {
-        ToStringStyle style = new ToStringStyleImpl();
+        final ToStringStyle style = new ToStringStyleImpl();
         style.setArraySeparator(null);
         assertEquals("", style.getArraySeparator());
     }
 
     @Test
     public void testSetContentStart() {
-        ToStringStyle style = new ToStringStyleImpl();
+        final ToStringStyle style = new ToStringStyleImpl();
         style.setContentStart(null);
         assertEquals("", style.getContentStart());
     }
 
     @Test
     public void testSetContentEnd() {
-        ToStringStyle style = new ToStringStyleImpl();
+        final ToStringStyle style = new ToStringStyleImpl();
         style.setContentEnd(null);
         assertEquals("", style.getContentEnd());
     }
 
     @Test
     public void testSetFieldNameValueSeparator() {
-        ToStringStyle style = new ToStringStyleImpl();
+        final ToStringStyle style = new ToStringStyleImpl();
         style.setFieldNameValueSeparator(null);
         assertEquals("", style.getFieldNameValueSeparator());
     }
 
     @Test
     public void testSetFieldSeparator() {
-        ToStringStyle style = new ToStringStyleImpl();
+        final ToStringStyle style = new ToStringStyleImpl();
         style.setFieldSeparator(null);
         assertEquals("", style.getFieldSeparator());
     }
 
     @Test
     public void testSetNullText() {
-        ToStringStyle style = new ToStringStyleImpl();
+        final ToStringStyle style = new ToStringStyleImpl();
         style.setNullText(null);
         assertEquals("", style.getNullText());
     }
 
     @Test
     public void testSetSizeStartText() {
-        ToStringStyle style = new ToStringStyleImpl();
+        final ToStringStyle style = new ToStringStyleImpl();
         style.setSizeStartText(null);
         assertEquals("", style.getSizeStartText());
     }
 
     @Test
     public void testSetSizeEndText() {
-        ToStringStyle style = new ToStringStyleImpl();
+        final ToStringStyle style = new ToStringStyleImpl();
         style.setSizeEndText(null);
         assertEquals("", style.getSizeEndText());
     }
 
     @Test
     public void testSetSummaryObjectStartText() {
-        ToStringStyle style = new ToStringStyleImpl();
+        final ToStringStyle style = new ToStringStyleImpl();
         style.setSummaryObjectStartText(null);
         assertEquals("", style.getSummaryObjectStartText());
     }
 
     @Test
     public void testSetSummaryObjectEndText() {
-        ToStringStyle style = new ToStringStyleImpl();
+        final ToStringStyle style = new ToStringStyleImpl();
         style.setSummaryObjectEndText(null);
         assertEquals("", style.getSummaryObjectEndText());
     }

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/AbstractConcurrentInitializerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/AbstractConcurrentInitializerTest.java?rev=1436770&r1=1436769&r2=1436770&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/AbstractConcurrentInitializerTest.java (original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/AbstractConcurrentInitializerTest.java Tue Jan 22 07:09:45 2013
@@ -51,8 +51,8 @@ public abstract class AbstractConcurrent
      */
     @Test
     public void testGetMultipleTimes() throws ConcurrentException {
-        ConcurrentInitializer<Object> initializer = createInitializer();
-        Object obj = initializer.get();
+        final ConcurrentInitializer<Object> initializer = createInitializer();
+        final Object obj = initializer.get();
         for (int i = 0; i < 10; i++) {
             assertEquals("Got different object at " + i, obj, initializer.get());
         }
@@ -78,15 +78,15 @@ public abstract class AbstractConcurrent
                     startLatch.await();
                     // access the initializer
                     object = initializer.get();
-                } catch (InterruptedException iex) {
+                } catch (final InterruptedException iex) {
                     // ignore
-                } catch (ConcurrentException cex) {
+                } catch (final ConcurrentException cex) {
                     object = cex;
                 }
             }
         }
 
-        GetThread[] threads = new GetThread[threadCount];
+        final GetThread[] threads = new GetThread[threadCount];
         for (int i = 0; i < threadCount; i++) {
             threads[i] = new GetThread();
             threads[i].start();
@@ -94,13 +94,13 @@ public abstract class AbstractConcurrent
 
         // fire all threads and wait until they are ready
         startLatch.countDown();
-        for (Thread t : threads) {
+        for (final Thread t : threads) {
             t.join();
         }
 
         // check results
-        Object managedObject = initializer.get();
-        for (GetThread t : threads) {
+        final Object managedObject = initializer.get();
+        for (final GetThread t : threads) {
             assertEquals("Wrong object", managedObject, t.object);
         }
     }

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/BackgroundInitializerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/BackgroundInitializerTest.java?rev=1436770&r1=1436769&r2=1436770&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/BackgroundInitializerTest.java (original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/BackgroundInitializerTest.java Tue Jan 22 07:09:45 2013
@@ -33,11 +33,11 @@ public class BackgroundInitializerTest {
      */
     private void checkInitialize(final BackgroundInitializerTestImpl init) {
         try {
-            Integer result = init.get();
+            final Integer result = init.get();
             assertEquals("Wrong result", 1, result.intValue());
             assertEquals("Wrong number of invocations", 1, init.initializeCalls);
             assertNotNull("No future", init.getFuture());
-        } catch (ConcurrentException cex) {
+        } catch (final ConcurrentException cex) {
             fail("Unexpected exception: " + cex);
         }
     }
@@ -47,7 +47,7 @@ public class BackgroundInitializerTest {
      */
     @Test
     public void testInitialize() {
-        BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
+        final BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
         init.start();
         checkInitialize(init);
     }
@@ -58,7 +58,7 @@ public class BackgroundInitializerTest {
      */
     @Test
     public void testGetActiveExecutorBeforeStart() {
-        BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
+        final BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
         assertNull("Got an executor", init.getActiveExecutor());
     }
 
@@ -67,9 +67,9 @@ public class BackgroundInitializerTest {
      */
     @Test
     public void testGetActiveExecutorExternal() {
-        ExecutorService exec = Executors.newSingleThreadExecutor();
+        final ExecutorService exec = Executors.newSingleThreadExecutor();
         try {
-            BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl(
+            final BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl(
                     exec);
             init.start();
             assertSame("Wrong executor", exec, init.getActiveExecutor());
@@ -84,7 +84,7 @@ public class BackgroundInitializerTest {
      */
     @Test
     public void testGetActiveExecutorTemp() {
-        BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
+        final BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
         init.start();
         assertNotNull("No active executor", init.getActiveExecutor());
         checkInitialize(init);
@@ -96,7 +96,7 @@ public class BackgroundInitializerTest {
      */
     @Test
     public void testInitializeTempExecutor() {
-        BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
+        final BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
         assertTrue("Wrong result of start()", init.start());
         checkInitialize(init);
         assertTrue("Executor not shutdown", init.getActiveExecutor()
@@ -109,9 +109,9 @@ public class BackgroundInitializerTest {
      */
     @Test
     public void testSetExternalExecutor() throws Exception {
-        ExecutorService exec = Executors.newCachedThreadPool();
+        final ExecutorService exec = Executors.newCachedThreadPool();
         try {
-            BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
+            final BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
             init.setExternalExecutor(exec);
             assertEquals("Wrong executor service", exec, init
                     .getExternalExecutor());
@@ -129,12 +129,12 @@ public class BackgroundInitializerTest {
      */
     @Test
     public void testSetExternalExecutorAfterStart() throws ConcurrentException {
-        BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
+        final BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
         init.start();
         try {
             init.setExternalExecutor(Executors.newSingleThreadExecutor());
             fail("Could set executor after start()!");
-        } catch (IllegalStateException istex) {
+        } catch (final IllegalStateException istex) {
             init.get();
         }
     }
@@ -145,7 +145,7 @@ public class BackgroundInitializerTest {
      */
     @Test
     public void testStartMultipleTimes() {
-        BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
+        final BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
         assertTrue("Wrong result for start()", init.start());
         for (int i = 0; i < 10; i++) {
             assertFalse("Could start again", init.start());
@@ -158,7 +158,7 @@ public class BackgroundInitializerTest {
      */
     @Test(expected=IllegalStateException.class)
     public void testGetBeforeStart() throws ConcurrentException {
-        BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
+        final BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
         init.get();
     }
 
@@ -168,14 +168,14 @@ public class BackgroundInitializerTest {
      */
     @Test
     public void testGetRuntimeException() throws Exception {
-        BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
-        RuntimeException rex = new RuntimeException();
+        final BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
+        final RuntimeException rex = new RuntimeException();
         init.ex = rex;
         init.start();
         try {
             init.get();
             fail("Exception not thrown!");
-        } catch (Exception ex) {
+        } catch (final Exception ex) {
             assertEquals("Runtime exception not thrown", rex, ex);
         }
     }
@@ -186,14 +186,14 @@ public class BackgroundInitializerTest {
      */
     @Test
     public void testGetCheckedException() throws Exception {
-        BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
-        Exception ex = new Exception();
+        final BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
+        final Exception ex = new Exception();
         init.ex = ex;
         init.start();
         try {
             init.get();
             fail("Exception not thrown!");
-        } catch (ConcurrentException cex) {
+        } catch (final ConcurrentException cex) {
             assertEquals("Exception not thrown", ex, cex.getCause());
         }
     }
@@ -203,19 +203,19 @@ public class BackgroundInitializerTest {
      */
     @Test
     public void testGetInterruptedException() throws Exception {
-        ExecutorService exec = Executors.newSingleThreadExecutor();
+        final ExecutorService exec = Executors.newSingleThreadExecutor();
         final BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl(
                 exec);
         final CountDownLatch latch1 = new CountDownLatch(1);
         init.shouldSleep = true;
         init.start();
         final AtomicReference<InterruptedException> iex = new AtomicReference<InterruptedException>();
-        Thread getThread = new Thread() {
+        final Thread getThread = new Thread() {
             @Override
             public void run() {
                 try {
                     init.get();
-                } catch (ConcurrentException cex) {
+                } catch (final ConcurrentException cex) {
                     if (cex.getCause() instanceof InterruptedException) {
                         iex.set((InterruptedException) cex.getCause());
                     }
@@ -238,7 +238,7 @@ public class BackgroundInitializerTest {
      */
     @Test
     public void testIsStartedFalse() {
-        BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
+        final BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
         assertFalse("Already started", init.isStarted());
     }
 
@@ -247,7 +247,7 @@ public class BackgroundInitializerTest {
      */
     @Test
     public void testIsStartedTrue() {
-        BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
+        final BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
         init.start();
         assertTrue("Not started", init.isStarted());
     }
@@ -257,7 +257,7 @@ public class BackgroundInitializerTest {
      */
     @Test
     public void testIsStartedAfterGet() {
-        BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
+        final BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
         init.start();
         checkInitialize(init);
         assertTrue("Not started", init.isStarted());

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/BasicThreadFactoryTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/BasicThreadFactoryTest.java?rev=1436770&r1=1436769&r2=1436770&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/BasicThreadFactoryTest.java (original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/BasicThreadFactoryTest.java Tue Jan 22 07:09:45 2013
@@ -66,7 +66,7 @@ public class BasicThreadFactoryTest {
      */
     @Test
     public void testBuildDefaults() {
-        BasicThreadFactory factory = builder.build();
+        final BasicThreadFactory factory = builder.build();
         checkFactoryDefaults(factory);
     }
 
@@ -99,15 +99,15 @@ public class BasicThreadFactoryTest {
      */
     @Test
     public void testBuilderReset() {
-        ThreadFactory wrappedFactory = EasyMock.createMock(ThreadFactory.class);
-        Thread.UncaughtExceptionHandler exHandler = EasyMock
+        final ThreadFactory wrappedFactory = EasyMock.createMock(ThreadFactory.class);
+        final Thread.UncaughtExceptionHandler exHandler = EasyMock
                 .createMock(Thread.UncaughtExceptionHandler.class);
         EasyMock.replay(wrappedFactory, exHandler);
         builder.namingPattern(PATTERN).daemon(true).priority(
                 Thread.MAX_PRIORITY).uncaughtExceptionHandler(exHandler)
                 .wrappedFactory(wrappedFactory);
         builder.reset();
-        BasicThreadFactory factory = builder.build();
+        final BasicThreadFactory factory = builder.build();
         checkFactoryDefaults(factory);
         assertNotSame("Wrapped factory not reset", wrappedFactory, factory
                 .getWrappedFactory());
@@ -129,17 +129,17 @@ public class BasicThreadFactoryTest {
      */
     @Test
     public void testNewThreadNamingPattern() {
-        ThreadFactory wrapped = EasyMock.createMock(ThreadFactory.class);
-        Runnable r = EasyMock.createMock(Runnable.class);
+        final ThreadFactory wrapped = EasyMock.createMock(ThreadFactory.class);
+        final Runnable r = EasyMock.createMock(Runnable.class);
         final int count = 12;
         for (int i = 0; i < count; i++) {
             EasyMock.expect(wrapped.newThread(r)).andReturn(new Thread());
         }
         EasyMock.replay(wrapped, r);
-        BasicThreadFactory factory = builder.wrappedFactory(wrapped)
+        final BasicThreadFactory factory = builder.wrappedFactory(wrapped)
                 .namingPattern(PATTERN).build();
         for (int i = 0; i < count; i++) {
-            Thread t = factory.newThread(r);
+            final Thread t = factory.newThread(r);
             assertEquals("Wrong thread name", String.format(PATTERN, Long
                     .valueOf(i + 1)), t.getName());
             assertEquals("Wrong thread count", i + 1, factory.getThreadCount());
@@ -153,13 +153,13 @@ public class BasicThreadFactoryTest {
      */
     @Test
     public void testNewThreadNoNamingPattern() {
-        ThreadFactory wrapped = EasyMock.createMock(ThreadFactory.class);
-        Runnable r = EasyMock.createMock(Runnable.class);
+        final ThreadFactory wrapped = EasyMock.createMock(ThreadFactory.class);
+        final Runnable r = EasyMock.createMock(Runnable.class);
         final String name = "unchangedThreadName";
-        Thread t = new Thread(name);
+        final Thread t = new Thread(name);
         EasyMock.expect(wrapped.newThread(r)).andReturn(t);
         EasyMock.replay(wrapped, r);
-        BasicThreadFactory factory = builder.wrappedFactory(wrapped).build();
+        final BasicThreadFactory factory = builder.wrappedFactory(wrapped).build();
         assertSame("Wrong thread", t, factory.newThread(r));
         assertEquals("Name was changed", name, t.getName());
         EasyMock.verify(wrapped, r);
@@ -171,12 +171,12 @@ public class BasicThreadFactoryTest {
      * @param flag the value of the flag
      */
     private void checkDaemonFlag(final boolean flag) {
-        ThreadFactory wrapped = EasyMock.createMock(ThreadFactory.class);
-        Runnable r = EasyMock.createMock(Runnable.class);
-        Thread t = new Thread();
+        final ThreadFactory wrapped = EasyMock.createMock(ThreadFactory.class);
+        final Runnable r = EasyMock.createMock(Runnable.class);
+        final Thread t = new Thread();
         EasyMock.expect(wrapped.newThread(r)).andReturn(t);
         EasyMock.replay(wrapped, r);
-        BasicThreadFactory factory = builder.wrappedFactory(wrapped).daemon(
+        final BasicThreadFactory factory = builder.wrappedFactory(wrapped).daemon(
                 flag).build();
         assertSame("Wrong thread", t, factory.newThread(r));
         assertTrue("Wrong daemon flag", flag == t.isDaemon());
@@ -205,16 +205,16 @@ public class BasicThreadFactoryTest {
      */
     @Test
     public void testNewThreadNoDaemonFlag() {
-        ThreadFactory wrapped = EasyMock.createMock(ThreadFactory.class);
-        Runnable r1 = EasyMock.createMock(Runnable.class);
-        Runnable r2 = EasyMock.createMock(Runnable.class);
-        Thread t1 = new Thread();
-        Thread t2 = new Thread();
+        final ThreadFactory wrapped = EasyMock.createMock(ThreadFactory.class);
+        final Runnable r1 = EasyMock.createMock(Runnable.class);
+        final Runnable r2 = EasyMock.createMock(Runnable.class);
+        final Thread t1 = new Thread();
+        final Thread t2 = new Thread();
         t1.setDaemon(true);
         EasyMock.expect(wrapped.newThread(r1)).andReturn(t1);
         EasyMock.expect(wrapped.newThread(r2)).andReturn(t2);
         EasyMock.replay(wrapped, r1, r2);
-        BasicThreadFactory factory = builder.wrappedFactory(wrapped).build();
+        final BasicThreadFactory factory = builder.wrappedFactory(wrapped).build();
         assertSame("Wrong thread 1", t1, factory.newThread(r1));
         assertTrue("No daemon thread", t1.isDaemon());
         assertSame("Wrong thread 2", t2, factory.newThread(r2));
@@ -227,13 +227,13 @@ public class BasicThreadFactoryTest {
      */
     @Test
     public void testNewThreadPriority() {
-        ThreadFactory wrapped = EasyMock.createMock(ThreadFactory.class);
-        Runnable r = EasyMock.createMock(Runnable.class);
-        Thread t = new Thread();
+        final ThreadFactory wrapped = EasyMock.createMock(ThreadFactory.class);
+        final Runnable r = EasyMock.createMock(Runnable.class);
+        final Thread t = new Thread();
         EasyMock.expect(wrapped.newThread(r)).andReturn(t);
         EasyMock.replay(wrapped, r);
         final int priority = Thread.NORM_PRIORITY + 1;
-        BasicThreadFactory factory = builder.wrappedFactory(wrapped).priority(
+        final BasicThreadFactory factory = builder.wrappedFactory(wrapped).priority(
                 priority).build();
         assertSame("Wrong thread", t, factory.newThread(r));
         assertEquals("Wrong priority", priority, t.getPriority());
@@ -246,14 +246,14 @@ public class BasicThreadFactoryTest {
      */
     @Test
     public void testNewThreadNoPriority() {
-        ThreadFactory wrapped = EasyMock.createMock(ThreadFactory.class);
-        Runnable r = EasyMock.createMock(Runnable.class);
+        final ThreadFactory wrapped = EasyMock.createMock(ThreadFactory.class);
+        final Runnable r = EasyMock.createMock(Runnable.class);
         final int orgPriority = Thread.NORM_PRIORITY + 1;
-        Thread t = new Thread();
+        final Thread t = new Thread();
         t.setPriority(orgPriority);
         EasyMock.expect(wrapped.newThread(r)).andReturn(t);
         EasyMock.replay(wrapped, r);
-        BasicThreadFactory factory = builder.wrappedFactory(wrapped).build();
+        final BasicThreadFactory factory = builder.wrappedFactory(wrapped).build();
         assertSame("Wrong thread", t, factory.newThread(r));
         assertEquals("Wrong priority", orgPriority, t.getPriority());
         EasyMock.verify(wrapped, r);
@@ -264,14 +264,14 @@ public class BasicThreadFactoryTest {
      */
     @Test
     public void testNewThreadExHandler() {
-        ThreadFactory wrapped = EasyMock.createMock(ThreadFactory.class);
-        Runnable r = EasyMock.createMock(Runnable.class);
-        Thread.UncaughtExceptionHandler handler = EasyMock
+        final ThreadFactory wrapped = EasyMock.createMock(ThreadFactory.class);
+        final Runnable r = EasyMock.createMock(Runnable.class);
+        final Thread.UncaughtExceptionHandler handler = EasyMock
                 .createMock(Thread.UncaughtExceptionHandler.class);
-        Thread t = new Thread();
+        final Thread t = new Thread();
         EasyMock.expect(wrapped.newThread(r)).andReturn(t);
         EasyMock.replay(wrapped, r, handler);
-        BasicThreadFactory factory = builder.wrappedFactory(wrapped)
+        final BasicThreadFactory factory = builder.wrappedFactory(wrapped)
                 .uncaughtExceptionHandler(handler).build();
         assertSame("Wrong thread", t, factory.newThread(r));
         assertEquals("Wrong exception handler", handler, t
@@ -285,15 +285,15 @@ public class BasicThreadFactoryTest {
      */
     @Test
     public void testNewThreadNoExHandler() {
-        ThreadFactory wrapped = EasyMock.createMock(ThreadFactory.class);
-        Runnable r = EasyMock.createMock(Runnable.class);
-        Thread.UncaughtExceptionHandler handler = EasyMock
+        final ThreadFactory wrapped = EasyMock.createMock(ThreadFactory.class);
+        final Runnable r = EasyMock.createMock(Runnable.class);
+        final Thread.UncaughtExceptionHandler handler = EasyMock
                 .createMock(Thread.UncaughtExceptionHandler.class);
-        Thread t = new Thread();
+        final Thread t = new Thread();
         t.setUncaughtExceptionHandler(handler);
         EasyMock.expect(wrapped.newThread(r)).andReturn(t);
         EasyMock.replay(wrapped, r, handler);
-        BasicThreadFactory factory = builder.wrappedFactory(wrapped).build();
+        final BasicThreadFactory factory = builder.wrappedFactory(wrapped).build();
         assertSame("Wrong thread", t, factory.newThread(r));
         assertEquals("Wrong exception handler", handler, t
                 .getUncaughtExceptionHandler());

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/CallableBackgroundInitializerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/CallableBackgroundInitializerTest.java?rev=1436770&r1=1436769&r2=1436770&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/CallableBackgroundInitializerTest.java (original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/CallableBackgroundInitializerTest.java Tue Jan 22 07:09:45 2013
@@ -48,8 +48,8 @@ public class CallableBackgroundInitializ
      */
     @Test
     public void testInitExecutor() {
-        ExecutorService exec = Executors.newSingleThreadExecutor();
-        CallableBackgroundInitializer<Integer> init = new CallableBackgroundInitializer<Integer>(
+        final ExecutorService exec = Executors.newSingleThreadExecutor();
+        final CallableBackgroundInitializer<Integer> init = new CallableBackgroundInitializer<Integer>(
                 new TestCallable(), exec);
         assertEquals("Executor not set", exec, init.getExternalExecutor());
     }
@@ -60,7 +60,7 @@ public class CallableBackgroundInitializ
      */
     @Test(expected=IllegalArgumentException.class)
     public void testInitExecutorNullCallable() {
-        ExecutorService exec = Executors.newSingleThreadExecutor();
+        final ExecutorService exec = Executors.newSingleThreadExecutor();
         new CallableBackgroundInitializer<Integer>(null, exec);
     }
 
@@ -69,8 +69,8 @@ public class CallableBackgroundInitializ
      */
     @Test
     public void testInitialize() throws Exception {
-        TestCallable call = new TestCallable();
-        CallableBackgroundInitializer<Integer> init = new CallableBackgroundInitializer<Integer>(
+        final TestCallable call = new TestCallable();
+        final CallableBackgroundInitializer<Integer> init = new CallableBackgroundInitializer<Integer>(
                 call);
         assertEquals("Wrong result", RESULT, init.initialize());
         assertEquals("Wrong number of invocations", 1, call.callCount);

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/ConcurrentUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/ConcurrentUtilsTest.java?rev=1436770&r1=1436769&r2=1436770&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/ConcurrentUtilsTest.java (original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/ConcurrentUtilsTest.java Tue Jan 22 07:09:45 2013
@@ -108,11 +108,11 @@ public class ConcurrentUtilsTest {
      */
     @Test
     public void testExtractCauseError() {
-        Error err = new AssertionError("Test");
+        final Error err = new AssertionError("Test");
         try {
             ConcurrentUtils.extractCause(new ExecutionException(err));
             fail("Error not thrown!");
-        } catch (Error e) {
+        } catch (final Error e) {
             assertEquals("Wrong error", err, e);
         }
     }
@@ -122,11 +122,11 @@ public class ConcurrentUtilsTest {
      */
     @Test
     public void testExtractCauseUncheckedException() {
-        RuntimeException rex = new RuntimeException("Test");
+        final RuntimeException rex = new RuntimeException("Test");
         try {
             ConcurrentUtils.extractCause(new ExecutionException(rex));
             fail("Runtime exception not thrown!");
-        } catch (RuntimeException r) {
+        } catch (final RuntimeException r) {
             assertEquals("Wrong exception", rex, r);
         }
     }
@@ -136,8 +136,8 @@ public class ConcurrentUtilsTest {
      */
     @Test
     public void testExtractCauseChecked() {
-        Exception ex = new Exception("Test");
-        ConcurrentException cex = ConcurrentUtils
+        final Exception ex = new Exception("Test");
+        final ConcurrentException cex = ConcurrentUtils
                 .extractCause(new ExecutionException(ex));
         assertSame("Wrong cause", ex, cex.getCause());
     }
@@ -164,11 +164,11 @@ public class ConcurrentUtilsTest {
      */
     @Test
     public void testExtractCauseUncheckedError() {
-        Error err = new AssertionError("Test");
+        final Error err = new AssertionError("Test");
         try {
             ConcurrentUtils.extractCauseUnchecked(new ExecutionException(err));
             fail("Error not thrown!");
-        } catch (Error e) {
+        } catch (final Error e) {
             assertEquals("Wrong error", err, e);
         }
     }
@@ -178,11 +178,11 @@ public class ConcurrentUtilsTest {
      */
     @Test
     public void testExtractCauseUncheckedUncheckedException() {
-        RuntimeException rex = new RuntimeException("Test");
+        final RuntimeException rex = new RuntimeException("Test");
         try {
             ConcurrentUtils.extractCauseUnchecked(new ExecutionException(rex));
             fail("Runtime exception not thrown!");
-        } catch (RuntimeException r) {
+        } catch (final RuntimeException r) {
             assertEquals("Wrong exception", rex, r);
         }
     }
@@ -192,8 +192,8 @@ public class ConcurrentUtilsTest {
      */
     @Test
     public void testExtractCauseUncheckedChecked() {
-        Exception ex = new Exception("Test");
-        ConcurrentRuntimeException cex = ConcurrentUtils
+        final Exception ex = new Exception("Test");
+        final ConcurrentRuntimeException cex = ConcurrentUtils
                 .extractCauseUnchecked(new ExecutionException(ex));
         assertSame("Wrong cause", ex, cex.getCause());
     }
@@ -203,11 +203,11 @@ public class ConcurrentUtilsTest {
      */
     @Test
     public void testHandleCauseError() throws ConcurrentException {
-        Error err = new AssertionError("Test");
+        final Error err = new AssertionError("Test");
         try {
             ConcurrentUtils.handleCause(new ExecutionException(err));
             fail("Error not thrown!");
-        } catch (Error e) {
+        } catch (final Error e) {
             assertEquals("Wrong error", err, e);
         }
     }
@@ -217,11 +217,11 @@ public class ConcurrentUtilsTest {
      */
     @Test
     public void testHandleCauseUncheckedException() throws ConcurrentException {
-        RuntimeException rex = new RuntimeException("Test");
+        final RuntimeException rex = new RuntimeException("Test");
         try {
             ConcurrentUtils.handleCause(new ExecutionException(rex));
             fail("Runtime exception not thrown!");
-        } catch (RuntimeException r) {
+        } catch (final RuntimeException r) {
             assertEquals("Wrong exception", rex, r);
         }
     }
@@ -231,11 +231,11 @@ public class ConcurrentUtilsTest {
      */
     @Test
     public void testHandleCauseChecked() {
-        Exception ex = new Exception("Test");
+        final Exception ex = new Exception("Test");
         try {
             ConcurrentUtils.handleCause(new ExecutionException(ex));
             fail("ConcurrentException not thrown!");
-        } catch (ConcurrentException cex) {
+        } catch (final ConcurrentException cex) {
             assertEquals("Wrong cause", ex, cex.getCause());
         }
     }
@@ -256,11 +256,11 @@ public class ConcurrentUtilsTest {
      */
     @Test
     public void testHandleCauseUncheckedError() {
-        Error err = new AssertionError("Test");
+        final Error err = new AssertionError("Test");
         try {
             ConcurrentUtils.handleCauseUnchecked(new ExecutionException(err));
             fail("Error not thrown!");
-        } catch (Error e) {
+        } catch (final Error e) {
             assertEquals("Wrong error", err, e);
         }
     }
@@ -270,11 +270,11 @@ public class ConcurrentUtilsTest {
      */
     @Test
     public void testHandleCauseUncheckedUncheckedException() {
-        RuntimeException rex = new RuntimeException("Test");
+        final RuntimeException rex = new RuntimeException("Test");
         try {
             ConcurrentUtils.handleCauseUnchecked(new ExecutionException(rex));
             fail("Runtime exception not thrown!");
-        } catch (RuntimeException r) {
+        } catch (final RuntimeException r) {
             assertEquals("Wrong exception", rex, r);
         }
     }
@@ -284,11 +284,11 @@ public class ConcurrentUtilsTest {
      */
     @Test
     public void testHandleCauseUncheckedChecked() {
-        Exception ex = new Exception("Test");
+        final Exception ex = new Exception("Test");
         try {
             ConcurrentUtils.handleCauseUnchecked(new ExecutionException(ex));
             fail("ConcurrentRuntimeException not thrown!");
-        } catch (ConcurrentRuntimeException crex) {
+        } catch (final ConcurrentRuntimeException crex) {
             assertEquals("Wrong cause", ex, crex.getCause());
         }
     }
@@ -320,6 +320,7 @@ public class ConcurrentUtilsTest {
     @Test
     public void testInitialize() throws ConcurrentException {
         @SuppressWarnings("unchecked")
+        final
         ConcurrentInitializer<Object> init = EasyMock
                 .createMock(ConcurrentInitializer.class);
         final Object result = new Object();
@@ -344,6 +345,7 @@ public class ConcurrentUtilsTest {
     @Test
     public void testInitializeUnchecked() throws ConcurrentException {
         @SuppressWarnings("unchecked")
+        final
         ConcurrentInitializer<Object> init = EasyMock
                 .createMock(ConcurrentInitializer.class);
         final Object result = new Object();
@@ -360,6 +362,7 @@ public class ConcurrentUtilsTest {
     @Test
     public void testInitializeUncheckedEx() throws ConcurrentException {
         @SuppressWarnings("unchecked")
+        final
         ConcurrentInitializer<Object> init = EasyMock
                 .createMock(ConcurrentInitializer.class);
         final Exception cause = new Exception();
@@ -368,7 +371,7 @@ public class ConcurrentUtilsTest {
         try {
             ConcurrentUtils.initializeUnchecked(init);
             fail("Exception not thrown!");
-        } catch (ConcurrentRuntimeException crex) {
+        } catch (final ConcurrentRuntimeException crex) {
             assertSame("Wrong cause", cause, crex.getCause());
         }
         EasyMock.verify(init);
@@ -380,8 +383,8 @@ public class ConcurrentUtilsTest {
      */
     @Test
     public void testConstantFuture_Integer() throws Exception {
-        Integer value = Integer.valueOf(5);
-        Future<Integer> test = ConcurrentUtils.constantFuture(value);
+        final Integer value = Integer.valueOf(5);
+        final Future<Integer> test = ConcurrentUtils.constantFuture(value);
         assertTrue(test.isDone());
         assertSame(value, test.get());
         assertSame(value, test.get(1000, TimeUnit.SECONDS));
@@ -396,8 +399,8 @@ public class ConcurrentUtilsTest {
      */
     @Test
     public void testConstantFuture_null() throws Exception {
-        Integer value = null;
-        Future<Integer> test = ConcurrentUtils.constantFuture(value);
+        final Integer value = null;
+        final Future<Integer> test = ConcurrentUtils.constantFuture(value);
         assertTrue(test.isDone());
         assertSame(value, test.get());
         assertSame(value, test.get(1000, TimeUnit.SECONDS));
@@ -415,7 +418,7 @@ public class ConcurrentUtilsTest {
     public void testPutIfAbsentKeyPresent() {
         final String key = "testKey";
         final Integer value = 42;
-        ConcurrentMap<String, Integer> map = new ConcurrentHashMap<String, Integer>();
+        final ConcurrentMap<String, Integer> map = new ConcurrentHashMap<String, Integer>();
         map.put(key, value);
         assertEquals("Wrong result", value,
                 ConcurrentUtils.putIfAbsent(map, key, 0));
@@ -429,7 +432,7 @@ public class ConcurrentUtilsTest {
     public void testPutIfAbsentKeyNotPresent() {
         final String key = "testKey";
         final Integer value = 42;
-        ConcurrentMap<String, Integer> map = new ConcurrentHashMap<String, Integer>();
+        final ConcurrentMap<String, Integer> map = new ConcurrentHashMap<String, Integer>();
         assertEquals("Wrong result", value,
                 ConcurrentUtils.putIfAbsent(map, key, value));
         assertEquals("Wrong value in map", value, map.get(key));
@@ -450,12 +453,13 @@ public class ConcurrentUtilsTest {
     @Test
     public void testCreateIfAbsentKeyPresent() throws ConcurrentException {
         @SuppressWarnings("unchecked")
+        final
         ConcurrentInitializer<Integer> init = EasyMock
                 .createMock(ConcurrentInitializer.class);
         EasyMock.replay(init);
         final String key = "testKey";
         final Integer value = 42;
-        ConcurrentMap<String, Integer> map = new ConcurrentHashMap<String, Integer>();
+        final ConcurrentMap<String, Integer> map = new ConcurrentHashMap<String, Integer>();
         map.put(key, value);
         assertEquals("Wrong result", value,
                 ConcurrentUtils.createIfAbsent(map, key, init));
@@ -469,13 +473,14 @@ public class ConcurrentUtilsTest {
     @Test
     public void testCreateIfAbsentKeyNotPresent() throws ConcurrentException {
         @SuppressWarnings("unchecked")
+        final
         ConcurrentInitializer<Integer> init = EasyMock
                 .createMock(ConcurrentInitializer.class);
         final String key = "testKey";
         final Integer value = 42;
         EasyMock.expect(init.get()).andReturn(value);
         EasyMock.replay(init);
-        ConcurrentMap<String, Integer> map = new ConcurrentHashMap<String, Integer>();
+        final ConcurrentMap<String, Integer> map = new ConcurrentHashMap<String, Integer>();
         assertEquals("Wrong result", value,
                 ConcurrentUtils.createIfAbsent(map, key, init));
         assertEquals("Wrong value in map", value, map.get(key));
@@ -488,6 +493,7 @@ public class ConcurrentUtilsTest {
     @Test
     public void testCreateIfAbsentNullMap() throws ConcurrentException {
         @SuppressWarnings("unchecked")
+        final
         ConcurrentInitializer<Integer> init = EasyMock
                 .createMock(ConcurrentInitializer.class);
         EasyMock.replay(init);
@@ -501,7 +507,7 @@ public class ConcurrentUtilsTest {
      */
     @Test
     public void testCreateIfAbsentNullInit() throws ConcurrentException {
-        ConcurrentMap<String, Integer> map = new ConcurrentHashMap<String, Integer>();
+        final ConcurrentMap<String, Integer> map = new ConcurrentHashMap<String, Integer>();
         final String key = "testKey";
         final Integer value = 42;
         map.put(key, value);
@@ -517,7 +523,7 @@ public class ConcurrentUtilsTest {
     public void testCreateIfAbsentUncheckedSuccess() {
         final String key = "testKey";
         final Integer value = 42;
-        ConcurrentMap<String, Integer> map = new ConcurrentHashMap<String, Integer>();
+        final ConcurrentMap<String, Integer> map = new ConcurrentHashMap<String, Integer>();
         assertEquals("Wrong result", value,
                 ConcurrentUtils.createIfAbsentUnchecked(map, key,
                         new ConstantInitializer<Integer>(value)));
@@ -531,16 +537,17 @@ public class ConcurrentUtilsTest {
     public void testCreateIfAbsentUncheckedException()
             throws ConcurrentException {
         @SuppressWarnings("unchecked")
+        final
         ConcurrentInitializer<Integer> init = EasyMock
                 .createMock(ConcurrentInitializer.class);
-        Exception ex = new Exception();
+        final Exception ex = new Exception();
         EasyMock.expect(init.get()).andThrow(new ConcurrentException(ex));
         EasyMock.replay(init);
         try {
             ConcurrentUtils.createIfAbsentUnchecked(
                     new ConcurrentHashMap<String, Integer>(), "test", init);
             fail("Exception not thrown!");
-        } catch (ConcurrentRuntimeException crex) {
+        } catch (final ConcurrentRuntimeException crex) {
             assertEquals("Wrong cause", ex, crex.getCause());
         }
         EasyMock.verify(init);

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/ConstantInitializerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/ConstantInitializerTest.java?rev=1436770&r1=1436769&r2=1436770&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/ConstantInitializerTest.java (original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/ConstantInitializerTest.java Tue Jan 22 07:09:45 2013
@@ -115,8 +115,8 @@ public class ConstantInitializerTest {
      */
     @Test
     public void testToString() {
-        String s = init.toString();
-        Pattern pattern = Pattern
+        final String s = init.toString();
+        final Pattern pattern = Pattern
                 .compile("ConstantInitializer@\\d+ \\[ object = " + VALUE
                         + " \\]");
         assertTrue("Wrong string: " + s, pattern.matcher(s).matches());
@@ -127,7 +127,7 @@ public class ConstantInitializerTest {
      */
     @Test
     public void testToStringNull() {
-        String s = new ConstantInitializer<Object>(null).toString();
+        final String s = new ConstantInitializer<Object>(null).toString();
         assertTrue("Object not found: " + s, s.indexOf("object = null") > 0);
     }
 }

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/MultiBackgroundInitializerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/MultiBackgroundInitializerTest.java?rev=1436770&r1=1436769&r2=1436770&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/MultiBackgroundInitializerTest.java (original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/MultiBackgroundInitializerTest.java Tue Jan 22 07:09:45 2013
@@ -58,8 +58,8 @@ public class MultiBackgroundInitializerT
      */
     private void checkChild(final BackgroundInitializer<?> child,
             final ExecutorService expExec) throws ConcurrentException {
-        ChildBackgroundInitializer cinit = (ChildBackgroundInitializer) child;
-        Integer result = cinit.get();
+        final ChildBackgroundInitializer cinit = (ChildBackgroundInitializer) child;
+        final Integer result = cinit.get();
         assertEquals("Wrong result", 1, result.intValue());
         assertEquals("Wrong number of executions", 1, cinit.initializeCalls);
         if (expExec != null) {
@@ -92,7 +92,7 @@ public class MultiBackgroundInitializerT
     @Test
     public void testInitializeNoChildren() throws ConcurrentException {
         assertTrue("Wrong result of start()", initializer.start());
-        MultiBackgroundInitializer.MultiBackgroundInitializerResults res = initializer
+        final MultiBackgroundInitializer.MultiBackgroundInitializerResults res = initializer
                 .get();
         assertTrue("Got child initializers", res.initializerNames().isEmpty());
         assertTrue("Executor not shutdown", initializer.getActiveExecutor()
@@ -113,12 +113,12 @@ public class MultiBackgroundInitializerT
                     new ChildBackgroundInitializer());
         }
         initializer.start();
-        MultiBackgroundInitializer.MultiBackgroundInitializerResults res = initializer
+        final MultiBackgroundInitializer.MultiBackgroundInitializerResults res = initializer
                 .get();
         assertEquals("Wrong number of child initializers", count, res
                 .initializerNames().size());
         for (int i = 0; i < count; i++) {
-            String key = CHILD_INIT + i;
+            final String key = CHILD_INIT + i;
             assertTrue("Name not found: " + key, res.initializerNames()
                     .contains(key));
             assertEquals("Wrong result object", Integer.valueOf(1), res
@@ -145,7 +145,7 @@ public class MultiBackgroundInitializerT
      */
     @Test
     public void testInitializeExternalExec() throws ConcurrentException {
-        ExecutorService exec = Executors.newCachedThreadPool();
+        final ExecutorService exec = Executors.newCachedThreadPool();
         try {
             initializer = new MultiBackgroundInitializer(exec);
             checkInitialize();
@@ -164,10 +164,10 @@ public class MultiBackgroundInitializerT
     @Test
     public void testInitializeChildWithExecutor() throws ConcurrentException {
         final String initExec = "childInitializerWithExecutor";
-        ExecutorService exec = Executors.newSingleThreadExecutor();
+        final ExecutorService exec = Executors.newSingleThreadExecutor();
         try {
-            ChildBackgroundInitializer c1 = new ChildBackgroundInitializer();
-            ChildBackgroundInitializer c2 = new ChildBackgroundInitializer();
+            final ChildBackgroundInitializer c1 = new ChildBackgroundInitializer();
+            final ChildBackgroundInitializer c2 = new ChildBackgroundInitializer();
             c2.setExternalExecutor(exec);
             initializer.addInitializer(CHILD_INIT, c1);
             initializer.addInitializer(initExec, c2);
@@ -191,7 +191,7 @@ public class MultiBackgroundInitializerT
             initializer.addInitializer(CHILD_INIT,
                     new ChildBackgroundInitializer());
             fail("Could add initializer after start()!");
-        } catch (IllegalStateException istex) {
+        } catch (final IllegalStateException istex) {
             initializer.get();
         }
     }
@@ -202,7 +202,7 @@ public class MultiBackgroundInitializerT
      */
     @Test(expected = NoSuchElementException.class)
     public void testResultGetInitializerUnknown() throws ConcurrentException {
-        MultiBackgroundInitializer.MultiBackgroundInitializerResults res = checkInitialize();
+        final MultiBackgroundInitializer.MultiBackgroundInitializerResults res = checkInitialize();
         res.getInitializer("unknown");
     }
 
@@ -212,7 +212,7 @@ public class MultiBackgroundInitializerT
      */
     @Test(expected = NoSuchElementException.class)
     public void testResultGetResultObjectUnknown() throws ConcurrentException {
-        MultiBackgroundInitializer.MultiBackgroundInitializerResults res = checkInitialize();
+        final MultiBackgroundInitializer.MultiBackgroundInitializerResults res = checkInitialize();
         res.getResultObject("unknown");
     }
 
@@ -222,7 +222,7 @@ public class MultiBackgroundInitializerT
      */
     @Test(expected = NoSuchElementException.class)
     public void testResultGetExceptionUnknown() throws ConcurrentException {
-        MultiBackgroundInitializer.MultiBackgroundInitializerResults res = checkInitialize();
+        final MultiBackgroundInitializer.MultiBackgroundInitializerResults res = checkInitialize();
         res.getException("unknown");
     }
 
@@ -232,7 +232,7 @@ public class MultiBackgroundInitializerT
      */
     @Test(expected = NoSuchElementException.class)
     public void testResultIsExceptionUnknown() throws ConcurrentException {
-        MultiBackgroundInitializer.MultiBackgroundInitializerResults res = checkInitialize();
+        final MultiBackgroundInitializer.MultiBackgroundInitializerResults res = checkInitialize();
         res.isException("unknown");
     }
 
@@ -242,9 +242,9 @@ public class MultiBackgroundInitializerT
     @Test(expected = UnsupportedOperationException.class)
     public void testResultInitializerNamesModify() throws ConcurrentException {
         checkInitialize();
-        MultiBackgroundInitializer.MultiBackgroundInitializerResults res = initializer
+        final MultiBackgroundInitializer.MultiBackgroundInitializerResults res = initializer
                 .get();
-        Iterator<String> it = res.initializerNames().iterator();
+        final Iterator<String> it = res.initializerNames().iterator();
         it.next();
         it.remove();
     }
@@ -255,14 +255,14 @@ public class MultiBackgroundInitializerT
      */
     @Test
     public void testInitializeRuntimeEx() {
-        ChildBackgroundInitializer child = new ChildBackgroundInitializer();
+        final ChildBackgroundInitializer child = new ChildBackgroundInitializer();
         child.ex = new RuntimeException();
         initializer.addInitializer(CHILD_INIT, child);
         initializer.start();
         try {
             initializer.get();
             fail("Runtime exception not thrown!");
-        } catch (Exception ex) {
+        } catch (final Exception ex) {
             assertEquals("Wrong exception", child.ex, ex);
         }
     }
@@ -273,15 +273,15 @@ public class MultiBackgroundInitializerT
      */
     @Test
     public void testInitializeEx() throws ConcurrentException {
-        ChildBackgroundInitializer child = new ChildBackgroundInitializer();
+        final ChildBackgroundInitializer child = new ChildBackgroundInitializer();
         child.ex = new Exception();
         initializer.addInitializer(CHILD_INIT, child);
         initializer.start();
-        MultiBackgroundInitializer.MultiBackgroundInitializerResults res = initializer
+        final MultiBackgroundInitializer.MultiBackgroundInitializerResults res = initializer
                 .get();
         assertTrue("No exception flag", res.isException(CHILD_INIT));
         assertNull("Got a results object", res.getResultObject(CHILD_INIT));
-        ConcurrentException cex = res.getException(CHILD_INIT);
+        final ConcurrentException cex = res.getException(CHILD_INIT);
         assertEquals("Wrong cause", child.ex, cex.getCause());
     }
 
@@ -292,10 +292,10 @@ public class MultiBackgroundInitializerT
     @Test
     public void testInitializeResultsIsSuccessfulTrue()
             throws ConcurrentException {
-        ChildBackgroundInitializer child = new ChildBackgroundInitializer();
+        final ChildBackgroundInitializer child = new ChildBackgroundInitializer();
         initializer.addInitializer(CHILD_INIT, child);
         initializer.start();
-        MultiBackgroundInitializer.MultiBackgroundInitializerResults res = initializer
+        final MultiBackgroundInitializer.MultiBackgroundInitializerResults res = initializer
                 .get();
         assertTrue("Wrong success flag", res.isSuccessful());
     }
@@ -307,11 +307,11 @@ public class MultiBackgroundInitializerT
     @Test
     public void testInitializeResultsIsSuccessfulFalse()
             throws ConcurrentException {
-        ChildBackgroundInitializer child = new ChildBackgroundInitializer();
+        final ChildBackgroundInitializer child = new ChildBackgroundInitializer();
         child.ex = new Exception();
         initializer.addInitializer(CHILD_INIT, child);
         initializer.start();
-        MultiBackgroundInitializer.MultiBackgroundInitializerResults res = initializer
+        final MultiBackgroundInitializer.MultiBackgroundInitializerResults res = initializer
                 .get();
         assertFalse("Wrong success flag", res.isSuccessful());
     }
@@ -325,7 +325,7 @@ public class MultiBackgroundInitializerT
         final String nameMulti = "multiChildInitializer";
         initializer
                 .addInitializer(CHILD_INIT, new ChildBackgroundInitializer());
-        MultiBackgroundInitializer mi2 = new MultiBackgroundInitializer();
+        final MultiBackgroundInitializer mi2 = new MultiBackgroundInitializer();
         final int count = 3;
         for (int i = 0; i < count; i++) {
             mi2
@@ -334,11 +334,11 @@ public class MultiBackgroundInitializerT
         }
         initializer.addInitializer(nameMulti, mi2);
         initializer.start();
-        MultiBackgroundInitializer.MultiBackgroundInitializerResults res = initializer
+        final MultiBackgroundInitializer.MultiBackgroundInitializerResults res = initializer
                 .get();
-        ExecutorService exec = initializer.getActiveExecutor();
+        final ExecutorService exec = initializer.getActiveExecutor();
         checkChild(res.getInitializer(CHILD_INIT), exec);
-        MultiBackgroundInitializer.MultiBackgroundInitializerResults res2 = (MultiBackgroundInitializer.MultiBackgroundInitializerResults) res
+        final MultiBackgroundInitializer.MultiBackgroundInitializerResults res2 = (MultiBackgroundInitializer.MultiBackgroundInitializerResults) res
                 .getResultObject(nameMulti);
         assertEquals("Wrong number of initializers", count, res2
                 .initializerNames().size());