Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanMapTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanMapTestCase.java?rev=1632171&r1=1632170&r2=1632171&view=diff ============================================================================== --- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanMapTestCase.java (original) +++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanMapTestCase.java Wed Oct 15 20:15:17 2014 @@ -38,11 +38,11 @@ import org.apache.commons.collections.ma @SuppressWarnings("deprecation") public class BeanMapTestCase extends AbstractTestMap { - public BeanMapTestCase(String testName) { + public BeanMapTestCase(final String testName) { super(testName); } - public static void main(String[] args) { + public static void main(final String[] args) { TestRunner.run(suite()); } @@ -84,77 +84,77 @@ public class BeanMapTestCase extends Abs public int getSomeIntValue() { return someInt; } - public void setSomeIntValue(int value) { + public void setSomeIntValue(final int value) { someInt = value; } public long getSomeLongValue() { return someLong; } - public void setSomeLongValue(long value) { + public void setSomeLongValue(final long value) { someLong = value; } public double getSomeDoubleValue() { return someDouble; } - public void setSomeDoubleValue(double value) { + public void setSomeDoubleValue(final double value) { someDouble = value; } public float getSomeFloatValue() { return someFloat; } - public void setSomeFloatValue(float value) { + public void setSomeFloatValue(final float value) { someFloat = value; } public short getSomeShortValue() { return someShort; } - public void setSomeShortValue(short value) { + public void setSomeShortValue(final short value) { someShort = value; } public byte getSomeByteValue() { return someByte; } - public void setSomeByteValue(byte value) { + public void setSomeByteValue(final byte value) { someByte = value; } public char getSomeCharValue() { return someChar; } - public void setSomeCharValue(char value) { + public void setSomeCharValue(final char value) { someChar = value; } public String getSomeStringValue() { return someString; } - public void setSomeStringValue(String value) { + public void setSomeStringValue(final String value) { someString = value; } public Integer getSomeIntegerValue() { return someInteger; } - public void setSomeIntegerValue(Integer value) { + public void setSomeIntegerValue(final Integer value) { someInteger = value; } public Object getSomeObjectValue() { return someObject; } - public void setSomeObjectValue(Object value) { + public void setSomeObjectValue(final Object value) { someObject = value; } } public static class BeanThrowingExceptions extends BeanWithProperties { private static final long serialVersionUID = 1L; - public void setValueThrowingException(String value) { + public void setValueThrowingException(final String value) { throw new TestException(); } public String getValueThrowingException() { @@ -181,7 +181,7 @@ public class BeanMapTestCase extends Abs // all beans (and all objects for that matter. @Override public Object[] getSampleKeys() { - Object[] keys = new Object[] { + final Object[] keys = new Object[] { "someIntValue", "someLongValue", "someDoubleValue", @@ -208,7 +208,7 @@ public class BeanMapTestCase extends Abs // note to self: the sample values were created manually @Override public Object[] getSampleValues() { - Object[] values = new Object[] { + final Object[] values = new Object[] { new Integer(1234), new Long(1298341928234L), new Double(123423.34), @@ -226,7 +226,7 @@ public class BeanMapTestCase extends Abs @Override public Object[] getNewSampleValues() { - Object[] values = new Object[] { + final Object[] values = new Object[] { new Integer(223), new Long(23341928234L), new Double(23423.34), @@ -275,7 +275,7 @@ public class BeanMapTestCase extends Abs public Map<Object, Object> makeFullMap() { // note: These values must match (i.e. .equals() must return true) // those returned from getSampleValues(). - BeanWithProperties bean = new BeanWithProperties(); + final BeanWithProperties bean = new BeanWithProperties(); bean.setSomeIntValue(1234); bean.setSomeLongValue(1298341928234L); bean.setSomeDoubleValue(123423.34); @@ -335,40 +335,40 @@ public class BeanMapTestCase extends Abs } public void testBeanMapClone() { - BeanMap map = (BeanMap)makeFullMap(); + final BeanMap map = (BeanMap)makeFullMap(); try { - BeanMap map2 = (BeanMap)map.clone(); + final BeanMap map2 = (BeanMap)map.clone(); // make sure containsKey is working to verify the bean was cloned // ok, and the read methods were properly initialized - Object[] keys = getSampleKeys(); + final Object[] keys = getSampleKeys(); for(int i = 0; i < keys.length; i++) { assertTrue("Cloned BeanMap should contain the same keys", map2.containsKey(keys[i])); } - } catch (CloneNotSupportedException exception) { + } catch (final CloneNotSupportedException exception) { fail("BeanMap.clone() should not throw a " + "CloneNotSupportedException when clone should succeed."); } } public void testBeanMapPutAllWriteable() { - BeanMap map1 = (BeanMap)makeFullMap(); - BeanMap map2 = (BeanMap)makeFullMap(); + final BeanMap map1 = (BeanMap)makeFullMap(); + final BeanMap map2 = (BeanMap)makeFullMap(); map2.put("someIntValue", new Integer(0)); map1.putAllWriteable(map2); assertEquals(map1.get("someIntValue"), new Integer(0)); } public void testMethodAccessor() throws Exception { - BeanMap map = (BeanMap) makeFullMap(); - Method method = BeanWithProperties.class.getDeclaredMethod("getSomeIntegerValue"); + final BeanMap map = (BeanMap) makeFullMap(); + final Method method = BeanWithProperties.class.getDeclaredMethod("getSomeIntegerValue"); assertEquals(method, map.getReadMethod("someIntegerValue")); } public void testMethodMutator() throws Exception { - BeanMap map = (BeanMap) makeFullMap(); - Method method = BeanWithProperties.class.getDeclaredMethod("setSomeIntegerValue", new Class[] {Integer.class}); + final BeanMap map = (BeanMap) makeFullMap(); + final Method method = BeanWithProperties.class.getDeclaredMethod("setSomeIntegerValue", new Class[] {Integer.class}); assertEquals(method, map.getWriteMethod("someIntegerValue")); } @@ -376,7 +376,7 @@ public class BeanMapTestCase extends Abs * Test the default transformers using the getTypeTransformer() method */ public void testGetTypeTransformerMethod() { - BeanMap beanMap = new BeanMap(); + final BeanMap beanMap = new BeanMap(); assertEquals("Boolean.TYPE", Boolean.TRUE, beanMap.getTypeTransformer(Boolean.TYPE).transform("true")); assertEquals("Character.TYPE", new Character('B'), beanMap.getTypeTransformer(Character.TYPE).transform("BCD")); assertEquals("Byte.TYPE", new Byte((byte)1), beanMap.getTypeTransformer(Byte.TYPE).transform("1")); @@ -418,25 +418,25 @@ public class BeanMapTestCase extends Abs try { BeanMap.defaultTransformers.clear(); fail("clear() - expected UnsupportedOperationException"); - } catch(UnsupportedOperationException e) { + } catch(final UnsupportedOperationException e) { // expected result } try { BeanMap.defaultTransformers.put("FOO", null); fail("put() - expected UnsupportedOperationException"); - } catch(UnsupportedOperationException e) { + } catch(final UnsupportedOperationException e) { // expected result } try { BeanMap.defaultTransformers.putAll(new HashMap<Object, Object>()); fail("putAll() - expected UnsupportedOperationException"); - } catch(UnsupportedOperationException e) { + } catch(final UnsupportedOperationException e) { // expected result } try { BeanMap.defaultTransformers.remove("FOO"); fail("remove() - expected UnsupportedOperationException"); - } catch(UnsupportedOperationException e) { + } catch(final UnsupportedOperationException e) { // expected result } } @@ -453,15 +453,15 @@ public class BeanMapTestCase extends Abs // Test cloning a non-public bean (instantiation exception) try { - Object bean = Jira87BeanFactory.createMappedPropertyBean(); - BeanMap map = new BeanMap(bean); + final Object bean = Jira87BeanFactory.createMappedPropertyBean(); + final BeanMap map = new BeanMap(bean); map.clone(); fail("Non-public bean clone() - expected CloneNotSupportedException"); - } catch (CloneNotSupportedException e) { + } catch (final CloneNotSupportedException e) { Throwable cause = null; try { cause = (Throwable)PropertyUtils.getProperty(e, "cause"); - } catch (Exception e2) { + } catch (final Exception e2) { fail("Non-public bean - retrieving the cause threw " + e2); } assertNotNull("Non-public bean cause null", cause); @@ -470,14 +470,14 @@ public class BeanMapTestCase extends Abs // Test cloning a bean that throws exception try { - BeanMap map = new BeanMap(new BeanThrowingExceptions()); + final BeanMap map = new BeanMap(new BeanThrowingExceptions()); map.clone(); fail("Setter Exception clone() - expected CloneNotSupportedException"); - } catch (CloneNotSupportedException e) { + } catch (final CloneNotSupportedException e) { Throwable cause = null; try { cause = (Throwable)PropertyUtils.getProperty(e, "cause"); - } catch (Exception e2) { + } catch (final Exception e2) { fail("Setter Exception - retrieving the cause threw " + e2); } assertNotNull("Setter Exception cause null", cause); @@ -496,15 +496,15 @@ public class BeanMapTestCase extends Abs } try { - Object bean = Jira87BeanFactory.createMappedPropertyBean(); - BeanMap map = new BeanMap(bean); + final Object bean = Jira87BeanFactory.createMappedPropertyBean(); + final BeanMap map = new BeanMap(bean); map.clear(); fail("clear() - expected UnsupportedOperationException"); - } catch (UnsupportedOperationException e) { + } catch (final UnsupportedOperationException e) { Throwable cause = null; try { cause = (Throwable)PropertyUtils.getProperty(e, "cause"); - } catch (Exception e2) { + } catch (final Exception e2) { fail("Retrieving the cause threw " + e2); } assertNotNull("Cause null", cause); @@ -523,16 +523,16 @@ public class BeanMapTestCase extends Abs } try { - Map<Object, Object> map = new BeanMap(new BeanThrowingExceptions()); + final Map<Object, Object> map = new BeanMap(new BeanThrowingExceptions()); map.put("valueThrowingException", "value"); fail("Setter exception - expected IllegalArgumentException"); - } catch (IllegalArgumentException e) { + } catch (final IllegalArgumentException e) { Throwable cause1 = null; Throwable cause2 = null; try { cause1 = (Throwable)PropertyUtils.getProperty(e, "cause"); cause2 = (Throwable)PropertyUtils.getProperty(e, "cause.cause"); - } catch (Exception e2) { + } catch (final Exception e2) { fail("Setter exception - retrieving the cause threw " + e2); } assertNotNull("Setter exception cause 1 null", cause1);
Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanPredicateTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanPredicateTestCase.java?rev=1632171&r1=1632170&r2=1632171&view=diff ============================================================================== --- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanPredicateTestCase.java (original) +++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanPredicateTestCase.java Wed Oct 15 20:15:17 2014 @@ -29,35 +29,35 @@ import org.apache.commons.collections.fu */ public class BeanPredicateTestCase extends TestCase { - public BeanPredicateTestCase(String name) { + public BeanPredicateTestCase(final String name) { super(name); } public void testEqual() { - BeanPredicate predicate = + final BeanPredicate predicate = new BeanPredicate("stringProperty",new EqualPredicate("foo")); assertTrue(predicate.evaluate(new TestBean("foo"))); assertTrue(!predicate.evaluate(new TestBean("bar"))); } public void testNotEqual() { - BeanPredicate predicate = + final BeanPredicate predicate = new BeanPredicate("stringProperty",new NotPredicate( new EqualPredicate("foo"))); assertTrue(!predicate.evaluate(new TestBean("foo"))); assertTrue(predicate.evaluate(new TestBean("bar"))); } public void testInstanceOf() { - BeanPredicate predicate = + final BeanPredicate predicate = new BeanPredicate("stringProperty",new InstanceofPredicate( String.class )); assertTrue(predicate.evaluate(new TestBean("foo"))); assertTrue(predicate.evaluate(new TestBean("bar"))); } public void testNull() { - BeanPredicate predicate = + final BeanPredicate predicate = new BeanPredicate("stringProperty", NullPredicate.INSTANCE); - String nullString = null; + final String nullString = null; assertTrue(predicate.evaluate(new TestBean(nullString))); assertTrue(!predicate.evaluate(new TestBean("bar"))); } Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanPropertyValueChangeClosureTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanPropertyValueChangeClosureTestCase.java?rev=1632171&r1=1632170&r2=1632171&view=diff ============================================================================== --- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanPropertyValueChangeClosureTestCase.java (original) +++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanPropertyValueChangeClosureTestCase.java Wed Oct 15 20:15:17 2014 @@ -38,7 +38,7 @@ public class BeanPropertyValueChangeClos * * @param name Name of this test case. */ - public BeanPropertyValueChangeClosureTestCase(String name) { + public BeanPropertyValueChangeClosureTestCase(final String name) { super(name); } @@ -46,7 +46,7 @@ public class BeanPropertyValueChangeClos * Test execute with simple float property and Float value. */ public void testExecuteWithSimpleFloatPropertyAndFloatValue() { - TestBean testBean = new TestBean(); + final TestBean testBean = new TestBean(); new BeanPropertyValueChangeClosure("floatProperty", expectedFloatValue).execute(testBean); assertTrue(expectedFloatValue.floatValue() == testBean.getFloatProperty()); } @@ -58,7 +58,7 @@ public class BeanPropertyValueChangeClos try { new BeanPropertyValueChangeClosure("floatProperty", "123").execute(new TestBean()); fail("Should have thrown an IllegalArgumentException"); - } catch (IllegalArgumentException e) { + } catch (final IllegalArgumentException e) { /* this is what we expect */ } } @@ -70,7 +70,7 @@ public class BeanPropertyValueChangeClos try { new BeanPropertyValueChangeClosure("floatProperty", expectedDoubleValue).execute(new TestBean()); fail("Should have thrown an IllegalArgumentException"); - } catch (IllegalArgumentException e) { + } catch (final IllegalArgumentException e) { /* this is what we expect */ } } @@ -79,7 +79,7 @@ public class BeanPropertyValueChangeClos * Test execute with simple float property and Integer value. */ public void testExecuteWithSimpleFloatPropertyAndIntegerValue() { - TestBean testBean = new TestBean(); + final TestBean testBean = new TestBean(); new BeanPropertyValueChangeClosure("floatProperty", expectedIntegerValue).execute(testBean); assertTrue(expectedIntegerValue.floatValue() == testBean.getFloatProperty()); } @@ -88,7 +88,7 @@ public class BeanPropertyValueChangeClos * Test execute with simple double property and Double value. */ public void testExecuteWithSimpleDoublePropertyAndDoubleValue() { - TestBean testBean = new TestBean(); + final TestBean testBean = new TestBean(); new BeanPropertyValueChangeClosure("doubleProperty", expectedDoubleValue).execute(testBean); assertTrue(expectedDoubleValue.doubleValue() == testBean.getDoubleProperty()); } @@ -100,7 +100,7 @@ public class BeanPropertyValueChangeClos try { new BeanPropertyValueChangeClosure("doubleProperty", "123").execute(new TestBean()); fail("Should have thrown an IllegalArgumentException"); - } catch (IllegalArgumentException e) { + } catch (final IllegalArgumentException e) { /* this is what we expect */ } } @@ -109,7 +109,7 @@ public class BeanPropertyValueChangeClos * Test execute with simple double property and Float value. */ public void testExecuteWithSimpleDoublePropertyAndFloatValue() { - TestBean testBean = new TestBean(); + final TestBean testBean = new TestBean(); new BeanPropertyValueChangeClosure("doubleProperty", expectedFloatValue).execute(testBean); assertTrue(expectedFloatValue.doubleValue() == testBean.getDoubleProperty()); } @@ -118,7 +118,7 @@ public class BeanPropertyValueChangeClos * Test execute with simple double property and Integer value. */ public void testExecuteWithSimpleDoublePropertyAndIntegerValue() { - TestBean testBean = new TestBean(); + final TestBean testBean = new TestBean(); new BeanPropertyValueChangeClosure("doubleProperty", expectedIntegerValue).execute(testBean); assertTrue(expectedIntegerValue.doubleValue() == testBean.getDoubleProperty()); } @@ -130,7 +130,7 @@ public class BeanPropertyValueChangeClos try { new BeanPropertyValueChangeClosure("intProperty", expectedDoubleValue).execute(new TestBean()); fail("Should have thrown an IllegalArgumentException"); - } catch (IllegalArgumentException e) { + } catch (final IllegalArgumentException e) { /* this is what we expect */ } } @@ -142,7 +142,7 @@ public class BeanPropertyValueChangeClos try { new BeanPropertyValueChangeClosure("intProperty", "123").execute(new TestBean()); fail("Should have thrown an IllegalArgumentException"); - } catch (IllegalArgumentException e) { + } catch (final IllegalArgumentException e) { /* this is what we expect */ } } @@ -154,7 +154,7 @@ public class BeanPropertyValueChangeClos try { new BeanPropertyValueChangeClosure("intProperty", expectedFloatValue).execute(new TestBean()); fail("Should have thrown an IllegalArgumentException"); - } catch (IllegalArgumentException e) { + } catch (final IllegalArgumentException e) { /* this is what we expect */ } } @@ -163,7 +163,7 @@ public class BeanPropertyValueChangeClos * Test execute with simple int property and Integer value. */ public void testExecuteWithSimpleIntPropertyAndIntegerValue() { - TestBean testBean = new TestBean(); + final TestBean testBean = new TestBean(); new BeanPropertyValueChangeClosure("intProperty", expectedIntegerValue).execute(testBean); assertTrue(expectedIntegerValue.intValue() == testBean.getIntProperty()); } @@ -172,7 +172,7 @@ public class BeanPropertyValueChangeClos * Test execute with simple boolean property and Boolean value. */ public void testExecuteWithSimpleBooleanPropertyAndBooleanValue() { - TestBean testBean = new TestBean(); + final TestBean testBean = new TestBean(); new BeanPropertyValueChangeClosure("booleanProperty", expectedBooleanValue).execute(testBean); assertTrue(expectedBooleanValue.booleanValue() == testBean.getBooleanProperty()); } @@ -184,7 +184,7 @@ public class BeanPropertyValueChangeClos try { new BeanPropertyValueChangeClosure("booleanProperty", "true").execute(new TestBean()); fail("Should have thrown an IllegalArgumentException"); - } catch (IllegalArgumentException e) { + } catch (final IllegalArgumentException e) { /* this is what we expect */ } } @@ -193,7 +193,7 @@ public class BeanPropertyValueChangeClos * Test execute with simple byte property and Byte value. */ public void testExecuteWithSimpleBytePropertyAndByteValue() { - TestBean testBean = new TestBean(); + final TestBean testBean = new TestBean(); new BeanPropertyValueChangeClosure("byteProperty", expectedByteValue).execute(testBean); assertTrue(expectedByteValue.byteValue() == testBean.getByteProperty()); } @@ -205,7 +205,7 @@ public class BeanPropertyValueChangeClos try { new BeanPropertyValueChangeClosure("byteProperty", "foo").execute(new TestBean()); fail("Should have thrown an IllegalArgumentException"); - } catch (IllegalArgumentException e) { + } catch (final IllegalArgumentException e) { /* this is what we expect */ } } @@ -217,7 +217,7 @@ public class BeanPropertyValueChangeClos try { new BeanPropertyValueChangeClosure("intProperty", null).execute(new TestBean()); fail("Should have thrown an IllegalArgumentException"); - } catch (IllegalArgumentException e) { + } catch (final IllegalArgumentException e) { /* this is what we expect */ } } @@ -229,7 +229,7 @@ public class BeanPropertyValueChangeClos try { new BeanPropertyValueChangeClosure("readOnlyProperty", "foo").execute(new TestBean()); fail("Should have thrown an IllegalArgumentException"); - } catch (IllegalArgumentException e) { + } catch (final IllegalArgumentException e) { /* this is what we expect */ } } @@ -238,7 +238,7 @@ public class BeanPropertyValueChangeClos * Test execute with write only property. */ public void testExecuteWithWriteOnlyProperty() { - TestBean testBean = new TestBean(); + final TestBean testBean = new TestBean(); new BeanPropertyValueChangeClosure("writeOnlyProperty", "foo").execute(testBean); assertEquals("foo", testBean.getWriteOnlyPropertyValue()); } @@ -247,7 +247,7 @@ public class BeanPropertyValueChangeClos * Test execute with a nested property. */ public void testExecuteWithNestedProperty() { - TestBean testBean = new TestBean(); + final TestBean testBean = new TestBean(); new BeanPropertyValueChangeClosure("nested.stringProperty", "bar").execute(testBean); assertEquals("bar", testBean.getNested().getStringProperty()); } @@ -259,7 +259,7 @@ public class BeanPropertyValueChangeClos try { new BeanPropertyValueChangeClosure("anotherNested.stringProperty", "foo").execute(new TestBean()); fail("Should have thrown an IllegalArgumentException"); - } catch (IllegalArgumentException e) { + } catch (final IllegalArgumentException e) { /* this is what we expect */ } } @@ -268,15 +268,15 @@ public class BeanPropertyValueChangeClos * Test execute with a nested property and null in the property path and ignoreNull = true. */ public void testExecuteWithNullInPropertyPathAngIgnoreTrue() { - TestBean testBean = new TestBean(); + final TestBean testBean = new TestBean(); // create a closure that will attempt to set a property on the null bean in the path - BeanPropertyValueChangeClosure closure = new BeanPropertyValueChangeClosure("anotherNested.stringProperty", + final BeanPropertyValueChangeClosure closure = new BeanPropertyValueChangeClosure("anotherNested.stringProperty", "Should ignore exception", true); try { closure.execute(testBean); - } catch (IllegalArgumentException e) { + } catch (final IllegalArgumentException e) { fail("Should have ignored the exception."); } } @@ -285,7 +285,7 @@ public class BeanPropertyValueChangeClos * Test execute with indexed property. */ public void testExecuteWithIndexedProperty() { - TestBean testBean = new TestBean(); + final TestBean testBean = new TestBean(); new BeanPropertyValueChangeClosure("intIndexed[0]", expectedIntegerValue).execute(testBean); assertTrue(expectedIntegerValue.intValue() == testBean.getIntIndexed(0)); } @@ -294,7 +294,7 @@ public class BeanPropertyValueChangeClos * Test execute with mapped property. */ public void testExecuteWithMappedProperty() { - TestBean testBean = new TestBean(); + final TestBean testBean = new TestBean(); new BeanPropertyValueChangeClosure("mappedProperty(fred)", "barney").execute(testBean); assertEquals("barney", testBean.getMappedProperty("fred")); } @@ -303,7 +303,7 @@ public class BeanPropertyValueChangeClos * Test execute with a simple String property. */ public void testExecuteWithSimpleStringProperty() { - TestBean testBean = new TestBean(); + final TestBean testBean = new TestBean(); new BeanPropertyValueChangeClosure("stringProperty", "barney").execute(testBean); assertEquals("barney", testBean.getStringProperty()); } @@ -315,7 +315,7 @@ public class BeanPropertyValueChangeClos try { new BeanPropertyValueChangeClosure("bogusProperty", "foo").execute(new TestBean()); fail("Should have thrown an IllegalArgumentException"); - } catch (IllegalArgumentException e) { + } catch (final IllegalArgumentException e) { /* this is what we expect */ } } Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanPropertyValueEqualsPredicateTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanPropertyValueEqualsPredicateTestCase.java?rev=1632171&r1=1632170&r2=1632171&view=diff ============================================================================== --- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanPropertyValueEqualsPredicateTestCase.java (original) +++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanPropertyValueEqualsPredicateTestCase.java Wed Oct 15 20:15:17 2014 @@ -38,7 +38,7 @@ public class BeanPropertyValueEqualsPred * * @param name Name of this test case. */ - public BeanPropertyValueEqualsPredicateTestCase(String name) { + public BeanPropertyValueEqualsPredicateTestCase(final String name) { super(name); } @@ -46,7 +46,7 @@ public class BeanPropertyValueEqualsPred * Test evaluate with simple String property. */ public void testEvaluateWithSimpleStringProperty() { - BeanPropertyValueEqualsPredicate predicate = + final BeanPropertyValueEqualsPredicate predicate = new BeanPropertyValueEqualsPredicate("stringProperty","foo"); assertTrue(predicate.evaluate(new TestBean("foo"))); assertTrue(!predicate.evaluate(new TestBean("bar"))); @@ -56,7 +56,7 @@ public class BeanPropertyValueEqualsPred * Test evaluate with simple String property and null values. */ public void testEvaluateWithSimpleStringPropertyWithNullValues() { - BeanPropertyValueEqualsPredicate predicate = + final BeanPropertyValueEqualsPredicate predicate = new BeanPropertyValueEqualsPredicate("stringProperty",null); assertTrue(predicate.evaluate(new TestBean((String) null))); assertTrue(!predicate.evaluate(new TestBean("bar"))); @@ -66,10 +66,10 @@ public class BeanPropertyValueEqualsPred * Test evaluate with nested property. */ public void testEvaluateWithNestedProperty() { - BeanPropertyValueEqualsPredicate predicate = + final BeanPropertyValueEqualsPredicate predicate = new BeanPropertyValueEqualsPredicate("anotherNested.stringProperty","match"); - TestBean testBean = new TestBean(); - TestBean nestedBean = new TestBean("match"); + final TestBean testBean = new TestBean(); + final TestBean nestedBean = new TestBean("match"); testBean.setAnotherNested(nestedBean); assertTrue(predicate.evaluate(testBean)); testBean.setAnotherNested(new TestBean("no-match")); @@ -80,13 +80,13 @@ public class BeanPropertyValueEqualsPred * Test evaluate with null in property path and ignore=false. */ public void testEvaluateWithNullInPath() { - BeanPropertyValueEqualsPredicate predicate = + final BeanPropertyValueEqualsPredicate predicate = new BeanPropertyValueEqualsPredicate("anotherNested.stringProperty","foo"); try { // try to evaluate the predicate predicate.evaluate(new TestBean()); fail("Should have throw IllegalArgumentException"); - } catch (IllegalArgumentException e) { + } catch (final IllegalArgumentException e) { /* ignore this is what should happen */ } } @@ -95,11 +95,11 @@ public class BeanPropertyValueEqualsPred * Test evaluate with null in property path and ignore=true. */ public void testEvaluateWithNullInPathAndIgnoreTrue() { - BeanPropertyValueEqualsPredicate predicate = + final BeanPropertyValueEqualsPredicate predicate = new BeanPropertyValueEqualsPredicate("anotherNested.stringProperty","foo", true); try { assertTrue(!predicate.evaluate(new TestBean())); - } catch (IllegalArgumentException e) { + } catch (final IllegalArgumentException e) { fail("Should not have throw IllegalArgumentException"); } } @@ -108,7 +108,7 @@ public class BeanPropertyValueEqualsPred * Test evaluate with int property. */ public void testEvaluateWithIntProperty() { - BeanPropertyValueEqualsPredicate predicate = + final BeanPropertyValueEqualsPredicate predicate = new BeanPropertyValueEqualsPredicate("intProperty",expectedIntegerValue); assertTrue(predicate.evaluate(new TestBean(expectedIntegerValue.intValue()))); assertTrue(!predicate.evaluate(new TestBean(expectedIntegerValue.intValue() - 1))); @@ -118,7 +118,7 @@ public class BeanPropertyValueEqualsPred * Test evaluate with float property. */ public void testEvaluateWithFloatProperty() { - BeanPropertyValueEqualsPredicate predicate = + final BeanPropertyValueEqualsPredicate predicate = new BeanPropertyValueEqualsPredicate("floatProperty",expectedFloatValue); assertTrue(predicate.evaluate(new TestBean(expectedFloatValue.floatValue()))); assertTrue(!predicate.evaluate(new TestBean(expectedFloatValue.floatValue() - 1))); @@ -128,7 +128,7 @@ public class BeanPropertyValueEqualsPred * Test evaluate with double property. */ public void testEvaluateWithDoubleProperty() { - BeanPropertyValueEqualsPredicate predicate = + final BeanPropertyValueEqualsPredicate predicate = new BeanPropertyValueEqualsPredicate("doubleProperty",expectedDoubleValue); assertTrue(predicate.evaluate(new TestBean(expectedDoubleValue.doubleValue()))); assertTrue(!predicate.evaluate(new TestBean(expectedDoubleValue.doubleValue() - 1))); @@ -138,7 +138,7 @@ public class BeanPropertyValueEqualsPred * Test evaluate with boolean property. */ public void testEvaluateWithBooleanProperty() { - BeanPropertyValueEqualsPredicate predicate = + final BeanPropertyValueEqualsPredicate predicate = new BeanPropertyValueEqualsPredicate("booleanProperty",expectedBooleanValue); assertTrue(predicate.evaluate(new TestBean(expectedBooleanValue.booleanValue()))); assertTrue(!predicate.evaluate(new TestBean(!expectedBooleanValue.booleanValue()))); @@ -148,9 +148,9 @@ public class BeanPropertyValueEqualsPred * Test evaluate with byte property. */ public void testEvaluateWithByteProperty() { - BeanPropertyValueEqualsPredicate predicate = + final BeanPropertyValueEqualsPredicate predicate = new BeanPropertyValueEqualsPredicate("byteProperty",expectedByteValue); - TestBean testBean = new TestBean(); + final TestBean testBean = new TestBean(); testBean.setByteProperty(expectedByteValue.byteValue()); assertTrue(predicate.evaluate(testBean)); testBean.setByteProperty((byte) (expectedByteValue.byteValue() - 1)); @@ -164,7 +164,7 @@ public class BeanPropertyValueEqualsPred // try a key that is in the map BeanPropertyValueEqualsPredicate predicate = new BeanPropertyValueEqualsPredicate("mappedProperty(test-key)","match"); - TestBean testBean = new TestBean(); + final TestBean testBean = new TestBean(); testBean.setMappedProperty("test-key", "match"); assertTrue(predicate.evaluate(testBean)); testBean.setMappedProperty("test-key", "no-match"); @@ -182,7 +182,7 @@ public class BeanPropertyValueEqualsPred // try a valid index BeanPropertyValueEqualsPredicate predicate = new BeanPropertyValueEqualsPredicate("intIndexed[0]",expectedIntegerValue); - TestBean testBean = new TestBean(); + final TestBean testBean = new TestBean(); testBean.setIntIndexed(0, expectedIntegerValue.intValue()); assertTrue(predicate.evaluate(testBean)); testBean.setIntIndexed(0, expectedIntegerValue.intValue() - 1); @@ -193,7 +193,7 @@ public class BeanPropertyValueEqualsPred try { assertTrue(!predicate.evaluate(testBean)); - } catch (ArrayIndexOutOfBoundsException e) { + } catch (final ArrayIndexOutOfBoundsException e) { /* this is what should happen */ } } @@ -217,10 +217,10 @@ public class BeanPropertyValueEqualsPred * Test evaluate with nested mapped property. */ public void testEvaluateWithNestedMappedProperty() { - BeanPropertyValueEqualsPredicate predicate = + final BeanPropertyValueEqualsPredicate predicate = new BeanPropertyValueEqualsPredicate("anotherNested.mappedProperty(test-key)","match"); - TestBean testBean = new TestBean(); - TestBean nestedBean = new TestBean(); + final TestBean testBean = new TestBean(); + final TestBean nestedBean = new TestBean(); nestedBean.setMappedProperty("test-key", "match"); testBean.setAnotherNested(nestedBean); assertTrue(predicate.evaluate(testBean)); @@ -234,7 +234,7 @@ public class BeanPropertyValueEqualsPred public void testEvaluateWithWriteOnlyProperty() { try { new BeanPropertyValueEqualsPredicate("writeOnlyProperty", null).evaluate(new TestBean()); - } catch (IllegalArgumentException e) { + } catch (final IllegalArgumentException e) { /* This is what should happen */ } } @@ -243,8 +243,8 @@ public class BeanPropertyValueEqualsPred * Test evaluate with read only property. */ public void testEvaluateWithReadOnlyProperty() { - TestBean testBean = new TestBean(); - BeanPropertyValueEqualsPredicate predicate = + final TestBean testBean = new TestBean(); + final BeanPropertyValueEqualsPredicate predicate = new BeanPropertyValueEqualsPredicate("readOnlyProperty",testBean.getReadOnlyProperty()); assertTrue(predicate.evaluate(new TestBean())); } @@ -255,7 +255,7 @@ public class BeanPropertyValueEqualsPred public void testEvaluateWithInvalidPropertyName() { try { new BeanPropertyValueEqualsPredicate("bogusProperty", null).evaluate(new TestBean()); - } catch (IllegalArgumentException e) { + } catch (final IllegalArgumentException e) { /* This is what should happen */ } } Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanToPropertyValueTransformerTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanToPropertyValueTransformerTestCase.java?rev=1632171&r1=1632170&r2=1632171&view=diff ============================================================================== --- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanToPropertyValueTransformerTestCase.java (original) +++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanToPropertyValueTransformerTestCase.java Wed Oct 15 20:15:17 2014 @@ -39,7 +39,7 @@ public class BeanToPropertyValueTransfor * * @param name Name of this test case. */ - public BeanToPropertyValueTransformerTestCase(String name) { + public BeanToPropertyValueTransformerTestCase(final String name) { super(name); } @@ -47,9 +47,9 @@ public class BeanToPropertyValueTransfor * Test transform with simple String property. */ public void testTransformWithSimpleStringProperty() { - BeanToPropertyValueTransformer transformer = + final BeanToPropertyValueTransformer transformer = new BeanToPropertyValueTransformer("stringProperty"); - TestBean testBean = new TestBean("foo"); + final TestBean testBean = new TestBean("foo"); assertEquals("foo", transformer.transform(testBean)); } @@ -58,9 +58,9 @@ public class BeanToPropertyValueTransfor * */ public void testTransformWithSimpleStringPropertyAndNullValue() { - BeanToPropertyValueTransformer transformer = + final BeanToPropertyValueTransformer transformer = new BeanToPropertyValueTransformer("stringProperty"); - TestBean testBean = new TestBean((String) null); + final TestBean testBean = new TestBean((String) null); assertNull(transformer.transform(testBean)); } @@ -68,9 +68,9 @@ public class BeanToPropertyValueTransfor * Test transform with simple int property. */ public void testTransformWithSimpleIntProperty() { - BeanToPropertyValueTransformer transformer = + final BeanToPropertyValueTransformer transformer = new BeanToPropertyValueTransformer("intProperty"); - TestBean testBean = new TestBean(expectedIntegerValue.intValue()); + final TestBean testBean = new TestBean(expectedIntegerValue.intValue()); assertEquals(expectedIntegerValue, transformer.transform(testBean)); } @@ -78,9 +78,9 @@ public class BeanToPropertyValueTransfor * Test transform with simple long property. */ public void testTransformWithSimpleLongProperty() { - BeanToPropertyValueTransformer transformer = + final BeanToPropertyValueTransformer transformer = new BeanToPropertyValueTransformer("longProperty"); - TestBean testBean = new TestBean(); + final TestBean testBean = new TestBean(); testBean.setLongProperty(expectedLongValue.longValue()); assertEquals(expectedLongValue, transformer.transform(testBean)); } @@ -89,9 +89,9 @@ public class BeanToPropertyValueTransfor * Test transform with simple float property. */ public void testTransformWithSimpleFloatProperty() { - BeanToPropertyValueTransformer transformer = + final BeanToPropertyValueTransformer transformer = new BeanToPropertyValueTransformer("floatProperty"); - TestBean testBean = new TestBean(expectedFloatValue.floatValue()); + final TestBean testBean = new TestBean(expectedFloatValue.floatValue()); assertEquals(expectedFloatValue, transformer.transform(testBean)); } @@ -99,9 +99,9 @@ public class BeanToPropertyValueTransfor * Test transform with simple double property. */ public void testTransformWithSimpleDoubleProperty() { - BeanToPropertyValueTransformer transformer = + final BeanToPropertyValueTransformer transformer = new BeanToPropertyValueTransformer("doubleProperty"); - TestBean testBean = new TestBean(expectedDoubleValue.doubleValue()); + final TestBean testBean = new TestBean(expectedDoubleValue.doubleValue()); assertEquals(expectedDoubleValue, transformer.transform(testBean)); } @@ -109,9 +109,9 @@ public class BeanToPropertyValueTransfor * Test transform with simple byte property. */ public void testTransformWithSimpleByteProperty() { - BeanToPropertyValueTransformer transformer = + final BeanToPropertyValueTransformer transformer = new BeanToPropertyValueTransformer("byteProperty"); - TestBean testBean = new TestBean(); + final TestBean testBean = new TestBean(); testBean.setByteProperty(expectedByteValue.byteValue()); assertEquals(expectedByteValue, transformer.transform(testBean)); } @@ -120,9 +120,9 @@ public class BeanToPropertyValueTransfor * Test transform with simple boolean property. */ public void testTransformWithSimpleBooleanProperty() { - BeanToPropertyValueTransformer transformer = + final BeanToPropertyValueTransformer transformer = new BeanToPropertyValueTransformer("booleanProperty"); - TestBean testBean = new TestBean(expectedBooleanValue.booleanValue()); + final TestBean testBean = new TestBean(expectedBooleanValue.booleanValue()); assertEquals(expectedBooleanValue, transformer.transform(testBean)); } @@ -132,7 +132,7 @@ public class BeanToPropertyValueTransfor public void testTransformWithWriteOnlyProperty() { try { new BeanToPropertyValueTransformer("writeOnlyProperty").transform(new TestBean()); - } catch (IllegalArgumentException e) { + } catch (final IllegalArgumentException e) { /* This is what should happen */ } } @@ -141,9 +141,9 @@ public class BeanToPropertyValueTransfor * Test transform with read only property. */ public void testTransformWithReadOnlyProperty() { - BeanToPropertyValueTransformer transformer = + final BeanToPropertyValueTransformer transformer = new BeanToPropertyValueTransformer("readOnlyProperty"); - TestBean testBean = new TestBean(); + final TestBean testBean = new TestBean(); assertEquals(testBean.getReadOnlyProperty(), transformer.transform(testBean)); } @@ -153,7 +153,7 @@ public class BeanToPropertyValueTransfor public void testTransformWithInvalidProperty() { try { new BeanToPropertyValueTransformer("bogusProperty").transform(new TestBean()); - } catch (IllegalArgumentException e) { + } catch (final IllegalArgumentException e) { /* This is what should happen */ } } @@ -162,10 +162,10 @@ public class BeanToPropertyValueTransfor * Test transform with nested property. */ public void testTransformWithNestedProperty() { - BeanToPropertyValueTransformer transformer = + final BeanToPropertyValueTransformer transformer = new BeanToPropertyValueTransformer("anotherNested.stringProperty"); - TestBean testBean = new TestBean(); - TestBean nestedBean = new TestBean("foo"); + final TestBean testBean = new TestBean(); + final TestBean nestedBean = new TestBean("foo"); testBean.setAnotherNested(nestedBean); assertEquals("foo", transformer.transform(testBean)); } @@ -176,7 +176,7 @@ public class BeanToPropertyValueTransfor public void testTransformWithMappedProperty() { BeanToPropertyValueTransformer transformer = new BeanToPropertyValueTransformer("mappedProperty(test-key)"); - TestBean testBean = new TestBean(); + final TestBean testBean = new TestBean(); // try a valid key testBean.setMappedProperty("test-key", "test-value"); @@ -193,7 +193,7 @@ public class BeanToPropertyValueTransfor public void testTransformWithIndexedProperty() { BeanToPropertyValueTransformer transformer = new BeanToPropertyValueTransformer("intIndexed[0]"); - TestBean testBean = new TestBean(); + final TestBean testBean = new TestBean(); testBean.setIntIndexed(0, expectedIntegerValue.intValue()); assertEquals(expectedIntegerValue, transformer.transform(testBean)); @@ -203,7 +203,7 @@ public class BeanToPropertyValueTransfor try { transformer.transform(testBean); fail("Should have thrown an ArrayIndexOutOfBoundsException"); - } catch (ArrayIndexOutOfBoundsException e) { + } catch (final ArrayIndexOutOfBoundsException e) { /* this is what should happen */ } } @@ -212,10 +212,10 @@ public class BeanToPropertyValueTransfor * Test transform with nested indexed property. */ public void testTransformWithNestedIndexedProperty() { - BeanToPropertyValueTransformer transformer = + final BeanToPropertyValueTransformer transformer = new BeanToPropertyValueTransformer("anotherNested.intIndexed[0]"); - TestBean testBean = new TestBean(); - TestBean nestedBean = new TestBean(); + final TestBean testBean = new TestBean(); + final TestBean nestedBean = new TestBean(); nestedBean.setIntIndexed(0, expectedIntegerValue.intValue()); testBean.setAnotherNested(nestedBean); assertEquals(expectedIntegerValue, transformer.transform(testBean)); @@ -225,13 +225,13 @@ public class BeanToPropertyValueTransfor * Test transform with null in property path. */ public void testTransformWithNullInPath() { - BeanToPropertyValueTransformer transformer = + final BeanToPropertyValueTransformer transformer = new BeanToPropertyValueTransformer("anotherNested.stringProperty"); try { transformer.transform(new TestBean()); fail("Should have throw IllegalArgumentException"); - } catch (IllegalArgumentException e) { + } catch (final IllegalArgumentException e) { /* ignore this is what should happen */ } } @@ -240,7 +240,7 @@ public class BeanToPropertyValueTransfor * Test transform with null in property path and ignore = true. */ public void testTransformWithNullInPathAndIgnoreTrue() { - BeanToPropertyValueTransformer transformer = + final BeanToPropertyValueTransformer transformer = new BeanToPropertyValueTransformer("anotherNested.stringProperty",true); assertEquals(null, transformer.transform(new TestBean())); } Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanUtils2TestCase.java URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanUtils2TestCase.java?rev=1632171&r1=1632170&r2=1632171&view=diff ============================================================================== --- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanUtils2TestCase.java (original) +++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanUtils2TestCase.java Wed Oct 15 20:15:17 2014 @@ -33,7 +33,7 @@ public class BeanUtils2TestCase extends * * @param name Name of the test case */ - public BeanUtils2TestCase(String name) { + public BeanUtils2TestCase(final String name) { super(name); } @@ -74,7 +74,7 @@ public class BeanUtils2TestCase extends public void testCopyPropertyConvertToString() { try { BeanUtils.copyProperty(bean, "stringProperty", testUtilDate); - } catch (Throwable t) { + } catch (final Throwable t) { fail("Threw " + t); } assertEquals("java.util.Date --> String", testStringDate, bean.getStringProperty()); @@ -88,7 +88,7 @@ public class BeanUtils2TestCase extends try { bean.setStringArray(null); BeanUtils.copyProperty(bean, "stringArray", new java.util.Date[] {testUtilDate}); - } catch (Throwable t) { + } catch (final Throwable t) { fail("Threw " + t); } assertEquals("java.util.Date[] --> String[] length", 1, bean.getStringArray().length); @@ -103,7 +103,7 @@ public class BeanUtils2TestCase extends try { bean.setStringArray(new String[1]); BeanUtils.copyProperty(bean, "stringArray[0]", testUtilDate); - } catch (Throwable t) { + } catch (final Throwable t) { fail("Threw " + t); } assertEquals("java.util.Date[] --> String[] length", 1, bean.getStringArray().length); @@ -119,7 +119,7 @@ public class BeanUtils2TestCase extends try { bean.setDateArrayProperty(new java.util.Date[] {testUtilDate}); value = BeanUtils.getArrayProperty(bean, "dateArrayProperty"); - } catch (Throwable t) { + } catch (final Throwable t) { fail("Threw " + t); } assertEquals("java.util.Date[] --> String[] length", 1, value.length); @@ -135,7 +135,7 @@ public class BeanUtils2TestCase extends try { bean.setDateArrayProperty(new java.util.Date[] {testUtilDate}); value = BeanUtils.getIndexedProperty(bean, "dateArrayProperty[0]"); - } catch (Throwable t) { + } catch (final Throwable t) { fail("Threw " + t); } assertEquals("java.util.Date[0] --> String", testStringDate, value); @@ -150,7 +150,7 @@ public class BeanUtils2TestCase extends try { bean.setDateProperty(testUtilDate); value = BeanUtils.getSimpleProperty(bean, "dateProperty"); - } catch (Throwable t) { + } catch (final Throwable t) { fail("Threw " + t); } assertEquals("java.util.Date --> String", testStringDate, value); @@ -163,7 +163,7 @@ public class BeanUtils2TestCase extends public void testSetPropertyConvertToString() { try { BeanUtils.setProperty(bean, "stringProperty", testUtilDate); - } catch (Throwable t) { + } catch (final Throwable t) { fail("Threw " + t); } assertEquals("java.util.Date --> String", testStringDate, bean.getStringProperty()); @@ -177,7 +177,7 @@ public class BeanUtils2TestCase extends try { bean.setStringArray(null); BeanUtils.setProperty(bean, "stringArray", new java.util.Date[] {testUtilDate}); - } catch (Throwable t) { + } catch (final Throwable t) { fail("Threw " + t); } assertEquals("java.util.Date[] --> String[] length", 1, bean.getStringArray().length); @@ -192,7 +192,7 @@ public class BeanUtils2TestCase extends try { bean.setStringArray(new String[1]); BeanUtils.setProperty(bean, "stringArray[0]", testUtilDate); - } catch (Throwable t) { + } catch (final Throwable t) { fail("Threw " + t); } assertEquals("java.util.Date --> String[]", testStringDate, bean.getStringArray()[0]); Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanUtilsBenchCase.java URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanUtilsBenchCase.java?rev=1632171&r1=1632170&r2=1632171&view=diff ============================================================================== --- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanUtilsBenchCase.java (original) +++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanUtilsBenchCase.java Wed Oct 15 20:15:17 2014 @@ -45,7 +45,7 @@ public class BeanUtilsBenchCase extends * * @param name Name of the test case */ - public BeanUtilsBenchCase(String name) { + public BeanUtilsBenchCase(final String name) { super(name); @@ -85,7 +85,7 @@ public class BeanUtilsBenchCase extends public void setUp() throws Exception { // Set up loop counter (if property specified) - String prop = System.getProperty("counter"); + final String prop = System.getProperty("counter"); if (prop != null) { counter = Long.parseLong(prop); } @@ -118,22 +118,22 @@ public class BeanUtilsBenchCase extends inDyna = dynaClass.newInstance(); Iterator<String> inKeys = inMap.keySet().iterator(); while (inKeys.hasNext()) { - String inKey = inKeys.next(); + final String inKey = inKeys.next(); inDyna.set(inKey, inMap.get(inKey)); } inStrs = new HashMap<String, String>(); inKeys = inMap.keySet().iterator(); while (inKeys.hasNext()) { - String inKey = inKeys.next(); + final String inKey = inKeys.next(); inStrs.put(inKey, inMap.get(inKey).toString()); } // Create output instances outBean = new BenchBean(); outDyna = dynaClass.newInstance(); - Iterator<String> outKeys = inMap.keySet().iterator(); + final Iterator<String> outKeys = inMap.keySet().iterator(); while (outKeys.hasNext()) { - String outKey = outKeys.next(); + final String outKey = outKeys.next(); outDyna.set(outKey, inMap.get(outKey)); }
