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 2014/10/15 22:15:22 UTC
svn commit: r1632171 [16/20] - in /commons/proper/beanutils/trunk/src:
main/java/org/apache/commons/beanutils/
main/java/org/apache/commons/beanutils/converters/
main/java/org/apache/commons/beanutils/expression/
main/java/org/apache/commons/beanutils/...
Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/PropsFirstPropertyUtilsBean.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/PropsFirstPropertyUtilsBean.java?rev=1632171&r1=1632170&r2=1632171&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/PropsFirstPropertyUtilsBean.java (original)
+++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/PropsFirstPropertyUtilsBean.java Wed Oct 15 20:15:17 2014
@@ -40,10 +40,10 @@ public class PropsFirstPropertyUtilsBean
* be correctly handled.
*/
@Override
- protected Object getPropertyOfMapBean(Map<?, ?> bean, String propertyName)
+ protected Object getPropertyOfMapBean(final Map<?, ?> bean, final String propertyName)
throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {
- PropertyDescriptor descriptor = getPropertyDescriptor(bean, propertyName);
+ final PropertyDescriptor descriptor = getPropertyDescriptor(bean, propertyName);
if (descriptor == null) {
// no simple property exists so return the value from the map
return bean.get(propertyName);
@@ -60,9 +60,9 @@ public class PropsFirstPropertyUtilsBean
* be correctly handled.
*/
@Override
- protected void setPropertyOfMapBean(Map<String, Object> bean, String propertyName, Object value)
+ protected void setPropertyOfMapBean(final Map<String, Object> bean, final String propertyName, final Object value)
throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {
- PropertyDescriptor descriptor = getPropertyDescriptor(bean, propertyName);
+ final PropertyDescriptor descriptor = getPropertyDescriptor(bean, propertyName);
if (descriptor == null) {
// no simple property exists so put the value into the map
bean.put(propertyName, value);
Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/SonOfAlphaBean.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/SonOfAlphaBean.java?rev=1632171&r1=1632170&r2=1632171&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/SonOfAlphaBean.java (original)
+++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/SonOfAlphaBean.java Wed Oct 15 20:15:17 2014
@@ -22,7 +22,7 @@ package org.apache.commons.beanutils;
*/
public class SonOfAlphaBean extends AlphaBean {
- public SonOfAlphaBean(String name) {
+ public SonOfAlphaBean(final String name) {
super(name);
}
}
Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/SuppressPropertiesBeanIntrospectorTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/SuppressPropertiesBeanIntrospectorTestCase.java?rev=1632171&r1=1632170&r2=1632171&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/SuppressPropertiesBeanIntrospectorTestCase.java (original)
+++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/SuppressPropertiesBeanIntrospectorTestCase.java Wed Oct 15 20:15:17 2014
@@ -38,7 +38,7 @@ public class SuppressPropertiesBeanIntro
try {
new SuppressPropertiesBeanIntrospector(null);
fail("Missing properties not detected!");
- } catch (IllegalArgumentException iaex) {
+ } catch (final IllegalArgumentException iaex) {
// ok
}
}
@@ -47,15 +47,15 @@ public class SuppressPropertiesBeanIntro
* Tests whether the expected properties have been removed during introspection.
*/
public void testRemovePropertiesDuringIntrospection() throws IntrospectionException {
- String[] properties = { "test", "other", "oneMore" };
- SuppressPropertiesBeanIntrospector introspector = new SuppressPropertiesBeanIntrospector(
+ final String[] properties = { "test", "other", "oneMore" };
+ final SuppressPropertiesBeanIntrospector introspector = new SuppressPropertiesBeanIntrospector(
Arrays.asList(properties));
- IntrospectionContextTestImpl context = new IntrospectionContextTestImpl();
+ final IntrospectionContextTestImpl context = new IntrospectionContextTestImpl();
introspector.introspect(context);
assertEquals("Wrong number of removed properties", properties.length, context
.getRemovedProperties().size());
- for (String property : properties) {
+ for (final String property : properties) {
assertTrue("Property not removed: " + property, context
.getRemovedProperties().contains(property));
}
@@ -66,12 +66,12 @@ public class SuppressPropertiesBeanIntro
* removed.
*/
public void testPropertyNamesDefensiveCopy() throws IntrospectionException {
- Collection<String> properties = new HashSet<String>();
+ final Collection<String> properties = new HashSet<String>();
properties.add("prop1");
- SuppressPropertiesBeanIntrospector introspector = new SuppressPropertiesBeanIntrospector(
+ final SuppressPropertiesBeanIntrospector introspector = new SuppressPropertiesBeanIntrospector(
properties);
properties.add("prop2");
- IntrospectionContextTestImpl context = new IntrospectionContextTestImpl();
+ final IntrospectionContextTestImpl context = new IntrospectionContextTestImpl();
introspector.introspect(context);
assertEquals("Wrong number of removed properties", 1, context
@@ -84,13 +84,13 @@ public class SuppressPropertiesBeanIntro
* Tests that the set with properties to be removed cannot be modified.
*/
public void testGetSuppressedPropertiesModify() {
- SuppressPropertiesBeanIntrospector introspector = new SuppressPropertiesBeanIntrospector(
+ final SuppressPropertiesBeanIntrospector introspector = new SuppressPropertiesBeanIntrospector(
Arrays.asList("p1", "p2"));
- Set<String> properties = introspector.getSuppressedProperties();
+ final Set<String> properties = introspector.getSuppressedProperties();
try {
properties.add("anotherProperty");
fail("Could modify properties");
- } catch (UnsupportedOperationException uoex) {
+ } catch (final UnsupportedOperationException uoex) {
// ok
}
}
@@ -116,23 +116,23 @@ public class SuppressPropertiesBeanIntro
throw new UnsupportedOperationException("Unexpected method call!");
}
- public void addPropertyDescriptor(PropertyDescriptor desc) {
+ public void addPropertyDescriptor(final PropertyDescriptor desc) {
throw new UnsupportedOperationException("Unexpected method call!");
}
- public void addPropertyDescriptors(PropertyDescriptor[] descriptors) {
+ public void addPropertyDescriptors(final PropertyDescriptor[] descriptors) {
throw new UnsupportedOperationException("Unexpected method call!");
}
- public boolean hasProperty(String name) {
+ public boolean hasProperty(final String name) {
throw new UnsupportedOperationException("Unexpected method call!");
}
- public PropertyDescriptor getPropertyDescriptor(String name) {
+ public PropertyDescriptor getPropertyDescriptor(final String name) {
throw new UnsupportedOperationException("Unexpected method call!");
}
- public void removePropertyDescriptor(String name) {
+ public void removePropertyDescriptor(final String name) {
removedProperties.add(name);
}
Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/TestBean.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/TestBean.java?rev=1632171&r1=1632170&r2=1632171&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/TestBean.java (original)
+++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/TestBean.java Wed Oct 15 20:15:17 2014
@@ -44,60 +44,60 @@ public class TestBean implements Seriali
listIndexed.add("String 4");
}
- public TestBean(String stringProperty) {
+ public TestBean(final String stringProperty) {
setStringProperty(stringProperty);
}
- public TestBean(float floatProperty) {
+ public TestBean(final float floatProperty) {
setFloatProperty(floatProperty);
}
- public TestBean(boolean booleanProperty) {
+ public TestBean(final boolean booleanProperty) {
setBooleanProperty(booleanProperty);
}
- public TestBean(Boolean booleanSecond) {
+ public TestBean(final Boolean booleanSecond) {
setBooleanSecond(booleanSecond.booleanValue());
}
- public TestBean(float floatProperty, String stringProperty) {
+ public TestBean(final float floatProperty, final String stringProperty) {
setFloatProperty(floatProperty);
setStringProperty(stringProperty);
}
- public TestBean(boolean booleanProperty, String stringProperty) {
+ public TestBean(final boolean booleanProperty, final String stringProperty) {
setBooleanProperty(booleanProperty);
setStringProperty(stringProperty);
}
- public TestBean(Boolean booleanSecond, String stringProperty) {
+ public TestBean(final Boolean booleanSecond, final String stringProperty) {
setBooleanSecond(booleanSecond.booleanValue());
setStringProperty(stringProperty);
}
- public TestBean(Integer intProperty) {
+ public TestBean(final Integer intProperty) {
setIntProperty(intProperty.intValue());
}
- public TestBean(double doubleProperty) {
+ public TestBean(final double doubleProperty) {
setDoubleProperty(doubleProperty);
}
- TestBean(int intProperty) {
+ TestBean(final int intProperty) {
setIntProperty(intProperty);
}
- protected TestBean(boolean booleanProperty, boolean booleanSecond, String stringProperty) {
+ protected TestBean(final boolean booleanProperty, final boolean booleanSecond, final String stringProperty) {
setBooleanProperty(booleanProperty);
setBooleanSecond(booleanSecond);
setStringProperty(stringProperty);
}
- public TestBean(List<Object> listIndexed) {
+ public TestBean(final List<Object> listIndexed) {
this.listIndexed = listIndexed;
}
- public TestBean(String[][] string2dArray) {
+ public TestBean(final String[][] string2dArray) {
this.string2dArray = string2dArray;
}
@@ -113,7 +113,7 @@ public class TestBean implements Seriali
return (booleanProperty);
}
- public void setBooleanProperty(boolean booleanProperty) {
+ public void setBooleanProperty(final boolean booleanProperty) {
this.booleanProperty = booleanProperty;
}
@@ -127,7 +127,7 @@ public class TestBean implements Seriali
return (booleanSecond);
}
- public void setBooleanSecond(boolean booleanSecond) {
+ public void setBooleanSecond(final boolean booleanSecond) {
this.booleanSecond = booleanSecond;
}
@@ -141,7 +141,7 @@ public class TestBean implements Seriali
return (this.byteProperty);
}
- public void setByteProperty(byte byteProperty) {
+ public void setByteProperty(final byte byteProperty) {
this.byteProperty = byteProperty;
}
@@ -155,7 +155,7 @@ public class TestBean implements Seriali
return dateProperty;
}
- public void setDateProperty(java.util.Date dateProperty) {
+ public void setDateProperty(final java.util.Date dateProperty) {
this.dateProperty = dateProperty;
}
@@ -168,7 +168,7 @@ public class TestBean implements Seriali
return dateArrayProperty;
}
- public void setDateArrayProperty(java.util.Date[] dateArrayProperty) {
+ public void setDateArrayProperty(final java.util.Date[] dateArrayProperty) {
this.dateArrayProperty = dateArrayProperty;
}
@@ -181,7 +181,7 @@ public class TestBean implements Seriali
return (this.doubleProperty);
}
- public void setDoubleProperty(double doubleProperty) {
+ public void setDoubleProperty(final double doubleProperty) {
this.doubleProperty = doubleProperty;
}
@@ -197,15 +197,15 @@ public class TestBean implements Seriali
return (this.dupProperty);
}
- public String getDupProperty(int index) {
+ public String getDupProperty(final int index) {
return (this.dupProperty[index]);
}
- public void setDupProperty(int index, String value) {
+ public void setDupProperty(final int index, final String value) {
this.dupProperty[index] = value;
}
- public void setDupProperty(String[] dupProperty) {
+ public void setDupProperty(final String[] dupProperty) {
this.dupProperty = dupProperty;
}
@@ -219,7 +219,7 @@ public class TestBean implements Seriali
return (this.floatProperty);
}
- public void setFloatProperty(float floatProperty) {
+ public void setFloatProperty(final float floatProperty) {
this.floatProperty = floatProperty;
}
@@ -233,7 +233,7 @@ public class TestBean implements Seriali
return (this.intArray);
}
- public void setIntArray(int[] intArray) {
+ public void setIntArray(final int[] intArray) {
this.intArray = intArray;
}
@@ -243,11 +243,11 @@ public class TestBean implements Seriali
*/
private final int intIndexed[] = { 0, 10, 20, 30, 40 };
- public int getIntIndexed(int index) {
+ public int getIntIndexed(final int index) {
return (intIndexed[index]);
}
- public void setIntIndexed(int index, int value) {
+ public void setIntIndexed(final int index, final int value) {
intIndexed[index] = value;
}
@@ -261,7 +261,7 @@ public class TestBean implements Seriali
return (this.intProperty);
}
- public void setIntProperty(int intProperty) {
+ public void setIntProperty(final int intProperty) {
this.intProperty = intProperty;
}
@@ -285,7 +285,7 @@ public class TestBean implements Seriali
return (this.longProperty);
}
- public void setLongProperty(long longProperty) {
+ public void setLongProperty(final long longProperty) {
this.longProperty = longProperty;
}
@@ -321,7 +321,7 @@ public class TestBean implements Seriali
*/
private HashMap<String, Object> mappedObjects = null;
- public Object getMappedObjects(String key) {
+ public Object getMappedObjects(final String key) {
// Create the map the very first time
if (mappedObjects == null) {
mappedObjects = new HashMap<String, Object>();
@@ -331,7 +331,7 @@ public class TestBean implements Seriali
return (mappedObjects.get(key));
}
- public void setMappedObjects(String key, Object value) {
+ public void setMappedObjects(final String key, final Object value) {
// Create the map the very first time
if (mappedObjects == null) {
mappedObjects = new HashMap<String, Object>();
@@ -347,7 +347,7 @@ public class TestBean implements Seriali
*/
private HashMap<String, String> mappedProperty = null;
- public String getMappedProperty(String key) {
+ public String getMappedProperty(final String key) {
// Create the map the very first time
if (mappedProperty == null) {
mappedProperty = new HashMap<String, String>();
@@ -357,7 +357,7 @@ public class TestBean implements Seriali
return (mappedProperty.get(key));
}
- public void setMappedProperty(String key, String value) {
+ public void setMappedProperty(final String key, final String value) {
// Create the map the very first time
if (mappedProperty == null) {
mappedProperty = new HashMap<String, String>();
@@ -373,18 +373,18 @@ public class TestBean implements Seriali
*/
private HashMap<String, Integer> mappedIntProperty = null;
- public int getMappedIntProperty(String key) {
+ public int getMappedIntProperty(final String key) {
// Create the map the very first time
if (mappedIntProperty == null) {
mappedIntProperty = new HashMap<String, Integer>();
mappedIntProperty.put("One", 1);
mappedIntProperty.put("Two", 2);
}
- Integer x = mappedIntProperty.get(key);
+ final Integer x = mappedIntProperty.get(key);
return ((x == null) ? 0 : x.intValue());
}
- public void setMappedIntProperty(String key, int value) {
+ public void setMappedIntProperty(final String key, final int value) {
mappedIntProperty.put(key, value);
}
@@ -410,7 +410,7 @@ public class TestBean implements Seriali
return anotherNested;
}
- public void setAnotherNested( TestBean anotherNested ) {
+ public void setAnotherNested( final TestBean anotherNested ) {
this.anotherNested = anotherNested;
}
@@ -423,7 +423,7 @@ public class TestBean implements Seriali
return nestedDynaBean;
}
- public void setNestedDynaBean(DynaBean nestedDynaBean) {
+ public void setNestedDynaBean(final DynaBean nestedDynaBean) {
this.nestedDynaBean = nestedDynaBean;
}
@@ -431,8 +431,8 @@ public class TestBean implements Seriali
* Another nested reference to a bean containing mapp properties
*/
public class MappedTestBean {
- public void setValue(String key,String val) { }
- public String getValue(String key) { return "Mapped Value"; }
+ public void setValue(final String key,final String val) { }
+ public String getValue(final String key) { return "Mapped Value"; }
}
private MappedTestBean mappedNested = null;
@@ -454,7 +454,7 @@ public class TestBean implements Seriali
return (this.nullProperty);
}
- public void setNullProperty(String nullProperty) {
+ public void setNullProperty(final String nullProperty) {
this.nullProperty = nullProperty;
}
@@ -478,7 +478,7 @@ public class TestBean implements Seriali
return (this.shortProperty);
}
- public void setShortProperty(short shortProperty) {
+ public void setShortProperty(final short shortProperty) {
this.shortProperty = shortProperty;
}
@@ -493,7 +493,7 @@ public class TestBean implements Seriali
return (this.stringArray);
}
- public void setStringArray(String[] stringArray) {
+ public void setStringArray(final String[] stringArray) {
this.stringArray = stringArray;
}
@@ -504,16 +504,16 @@ public class TestBean implements Seriali
private final String[] stringIndexed =
{ "String 0", "String 1", "String 2", "String 3", "String 4" };
- public String getStringIndexed(int index) {
+ public String getStringIndexed(final int index) {
return (stringIndexed[index]);
}
- public void setStringIndexed(int index, String value) {
+ public void setStringIndexed(final int index, final String value) {
stringIndexed[index] = value;
}
private String[][] string2dArray = new String[][] {new String[] {"1", "2", "3"}, new String[] {"4","5","6"}};
- public String[] getString2dArray(int index) {
+ public String[] getString2dArray(final int index) {
return string2dArray[index];
}
@@ -526,7 +526,7 @@ public class TestBean implements Seriali
return (this.stringProperty);
}
- public void setStringProperty(String stringProperty) {
+ public void setStringProperty(final String stringProperty) {
this.stringProperty = stringProperty;
}
@@ -540,7 +540,7 @@ public class TestBean implements Seriali
return (this.writeOnlyProperty);
}
- public void setWriteOnlyProperty(String writeOnlyProperty) {
+ public void setWriteOnlyProperty(final String writeOnlyProperty) {
this.writeOnlyProperty = writeOnlyProperty;
}
@@ -564,7 +564,7 @@ public class TestBean implements Seriali
return (this.invalidBoolean);
}
- public void setInvalidBoolean(String invalidBoolean) {
+ public void setInvalidBoolean(final String invalidBoolean) {
if ("true".equalsIgnoreCase(invalidBoolean) ||
"yes".equalsIgnoreCase(invalidBoolean) ||
"1".equalsIgnoreCase(invalidBoolean)) {
@@ -610,7 +610,7 @@ public class TestBean implements Seriali
*
* @param amount Amount to be added to the current counter
*/
- public static void incrementCounter(int amount) {
+ public static void incrementCounter(final int amount) {
counter += amount;
@@ -622,7 +622,7 @@ public class TestBean implements Seriali
* as the method above so as to test the looseness
* of getMethod.
*/
- public static void incrementCounter(Number amount) {
+ public static void incrementCounter(final Number amount) {
counter += 2 * amount.intValue();
}
Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/TestResultSet.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/TestResultSet.java?rev=1632171&r1=1632170&r2=1632171&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/TestResultSet.java (original)
+++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/TestResultSet.java Wed Oct 15 20:15:17 2014
@@ -86,9 +86,9 @@ public class TestResultSet implements In
* @param invocationHandler Invocation Handler
* @return A result set proxy
*/
- public static ResultSet createProxy(InvocationHandler invocationHandler) {
- ClassLoader classLoader = ResultSet.class.getClassLoader();
- Class<?>[] interfaces = new Class[] { ResultSet.class };
+ public static ResultSet createProxy(final InvocationHandler invocationHandler) {
+ final ClassLoader classLoader = ResultSet.class.getClassLoader();
+ final Class<?>[] interfaces = new Class[] { ResultSet.class };
return (ResultSet)Proxy.newProxyInstance(classLoader, interfaces, invocationHandler);
}
@@ -104,7 +104,7 @@ public class TestResultSet implements In
*
* @param resultSetMetaData The result set meta data
*/
- public TestResultSet(ResultSetMetaData resultSetMetaData) {
+ public TestResultSet(final ResultSetMetaData resultSetMetaData) {
this.resultSetMetaData = resultSetMetaData;
}
@@ -117,8 +117,8 @@ public class TestResultSet implements In
* @return The result of invoking the method.
* @throws Throwable if an error occurs.
*/
- public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
- String methodName = method.getName();
+ public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {
+ final String methodName = method.getName();
if ("close".equals(methodName)) {
return null;
} if ("getMetaData".equals(methodName)) {
@@ -141,7 +141,7 @@ public class TestResultSet implements In
throw new UnsupportedOperationException(methodName + " not implemented");
}
- private String columnName(Object arg) throws SQLException {
+ private String columnName(final Object arg) throws SQLException {
if (arg instanceof Integer) {
return resultSetMetaData.getColumnName(((Integer)arg).intValue());
} else {
@@ -162,7 +162,7 @@ public class TestResultSet implements In
}
- public Object getObject(String columnName) throws SQLException {
+ public Object getObject(final String columnName) throws SQLException {
if (row > 5) {
throw new SQLException("No current row");
}
@@ -201,15 +201,15 @@ public class TestResultSet implements In
}
}
- public Date getDate(String columnName) throws SQLException {
+ public Date getDate(final String columnName) throws SQLException {
return (new Date(timestamp));
}
- public Time getTime(String columnName) throws SQLException {
+ public Time getTime(final String columnName) throws SQLException {
return (new Time(timestamp));
}
- public Timestamp getTimestamp(String columnName) throws SQLException {
+ public Timestamp getTimestamp(final String columnName) throws SQLException {
return (new Timestamp(timestamp));
}
@@ -222,7 +222,7 @@ public class TestResultSet implements In
}
- public void updateObject(String columnName, Object x)
+ public void updateObject(final String columnName, final Object x)
throws SQLException {
if (row > 5) {
throw new SQLException("No current row");
@@ -234,7 +234,7 @@ public class TestResultSet implements In
// -------------------------------------------------- Unimplemented Methods
- public boolean absolute(int row) throws SQLException {
+ public boolean absolute(final int row) throws SQLException {
throw new UnsupportedOperationException();
}
@@ -264,7 +264,7 @@ public class TestResultSet implements In
}
- public int findColumn(String columnName) throws SQLException {
+ public int findColumn(final String columnName) throws SQLException {
throw new UnsupportedOperationException();
}
@@ -274,118 +274,118 @@ public class TestResultSet implements In
}
- public Array getArray(int columnIndex) throws SQLException {
+ public Array getArray(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public Array getArray(String columnName) throws SQLException {
+ public Array getArray(final String columnName) throws SQLException {
throw new UnsupportedOperationException();
}
- public InputStream getAsciiStream(int columnIndex) throws SQLException {
+ public InputStream getAsciiStream(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public InputStream getAsciiStream(String columnName) throws SQLException {
+ public InputStream getAsciiStream(final String columnName) throws SQLException {
throw new UnsupportedOperationException();
}
- public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
+ public BigDecimal getBigDecimal(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
/** @deprecated */
@Deprecated
- public BigDecimal getBigDecimal(int columnIndex, int scale)
+ public BigDecimal getBigDecimal(final int columnIndex, final int scale)
throws SQLException {
throw new UnsupportedOperationException();
}
- public BigDecimal getBigDecimal(String columnName) throws SQLException {
+ public BigDecimal getBigDecimal(final String columnName) throws SQLException {
throw new UnsupportedOperationException();
}
/** @deprecated */
@Deprecated
- public BigDecimal getBigDecimal(String columnName, int scale)
+ public BigDecimal getBigDecimal(final String columnName, final int scale)
throws SQLException {
throw new UnsupportedOperationException();
}
- public InputStream getBinaryStream(int columnIndex) throws SQLException {
+ public InputStream getBinaryStream(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public InputStream getBinaryStream(String columnName) throws SQLException {
+ public InputStream getBinaryStream(final String columnName) throws SQLException {
throw new UnsupportedOperationException();
}
- public Blob getBlob(int columnIndex) throws SQLException {
+ public Blob getBlob(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public Blob getBlob(String columnName) throws SQLException {
+ public Blob getBlob(final String columnName) throws SQLException {
throw new UnsupportedOperationException();
}
- public boolean getBoolean(int columnIndex) throws SQLException {
+ public boolean getBoolean(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public boolean getBoolean(String columnName) throws SQLException {
+ public boolean getBoolean(final String columnName) throws SQLException {
throw new UnsupportedOperationException();
}
- public byte getByte(int columnIndex) throws SQLException {
+ public byte getByte(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public byte getByte(String columnName) throws SQLException {
+ public byte getByte(final String columnName) throws SQLException {
throw new UnsupportedOperationException();
}
- public byte[] getBytes(int columnIndex) throws SQLException {
+ public byte[] getBytes(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public byte[] getBytes(String columnName) throws SQLException {
+ public byte[] getBytes(final String columnName) throws SQLException {
throw new UnsupportedOperationException();
}
- public Reader getCharacterStream(int columnIndex)
+ public Reader getCharacterStream(final int columnIndex)
throws SQLException {
throw new UnsupportedOperationException();
}
- public Reader getCharacterStream(String columnName) throws SQLException {
+ public Reader getCharacterStream(final String columnName) throws SQLException {
throw new UnsupportedOperationException();
}
- public Clob getClob(int columnIndex) throws SQLException {
+ public Clob getClob(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public Clob getClob(String columnName) throws SQLException {
+ public Clob getClob(final String columnName) throws SQLException {
throw new UnsupportedOperationException();
}
@@ -400,29 +400,29 @@ public class TestResultSet implements In
}
- public Date getDate(int columnIndex) throws SQLException {
+ public Date getDate(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public Date getDate(int columnIndex, Calendar cal) throws SQLException {
+ public Date getDate(final int columnIndex, final Calendar cal) throws SQLException {
throw new UnsupportedOperationException();
}
- public Date getDate(String columnName, Calendar cal) throws SQLException {
+ public Date getDate(final String columnName, final Calendar cal) throws SQLException {
throw new UnsupportedOperationException();
}
- public double getDouble(int columnIndex) throws SQLException {
+ public double getDouble(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public double getDouble(String columnName) throws SQLException {
+ public double getDouble(final String columnName) throws SQLException {
throw new UnsupportedOperationException();
}
@@ -437,57 +437,57 @@ public class TestResultSet implements In
}
- public float getFloat(int columnIndex) throws SQLException {
+ public float getFloat(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public float getFloat(String columnName) throws SQLException {
+ public float getFloat(final String columnName) throws SQLException {
throw new UnsupportedOperationException();
}
- public int getInt(int columnIndex) throws SQLException {
+ public int getInt(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public int getInt(String columnName) throws SQLException {
+ public int getInt(final String columnName) throws SQLException {
throw new UnsupportedOperationException();
}
- public long getLong(int columnIndex) throws SQLException {
+ public long getLong(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public long getLong(String columnName) throws SQLException {
+ public long getLong(final String columnName) throws SQLException {
throw new UnsupportedOperationException();
}
- public Object getObject(int columnIndex) throws SQLException {
+ public Object getObject(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public Object getObject(int columnIndex, Map<?, ?> map) throws SQLException {
+ public Object getObject(final int columnIndex, final Map<?, ?> map) throws SQLException {
throw new UnsupportedOperationException();
}
- public Object getObject(String columnName, Map<?, ?> map) throws SQLException {
+ public Object getObject(final String columnName, final Map<?, ?> map) throws SQLException {
throw new UnsupportedOperationException();
}
- public Ref getRef(int columnIndex) throws SQLException {
+ public Ref getRef(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public Ref getRef(String columnName) throws SQLException {
+ public Ref getRef(final String columnName) throws SQLException {
throw new UnsupportedOperationException();
}
@@ -497,12 +497,12 @@ public class TestResultSet implements In
}
- public short getShort(int columnIndex) throws SQLException {
+ public short getShort(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public short getShort(String columnName) throws SQLException {
+ public short getShort(final String columnName) throws SQLException {
throw new UnsupportedOperationException();
}
@@ -512,45 +512,45 @@ public class TestResultSet implements In
}
- public String getString(int columnIndex) throws SQLException {
+ public String getString(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public String getString(String columnName) throws SQLException {
+ public String getString(final String columnName) throws SQLException {
throw new UnsupportedOperationException();
}
- public Time getTime(int columnIndex) throws SQLException {
+ public Time getTime(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public Time getTime(int columnIndex, Calendar cal) throws SQLException {
+ public Time getTime(final int columnIndex, final Calendar cal) throws SQLException {
throw new UnsupportedOperationException();
}
- public Time getTime(String columnName, Calendar cal) throws SQLException {
+ public Time getTime(final String columnName, final Calendar cal) throws SQLException {
throw new UnsupportedOperationException();
}
- public Timestamp getTimestamp(int columnIndex) throws SQLException {
+ public Timestamp getTimestamp(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public Timestamp getTimestamp(int columnIndex, Calendar cal)
+ public Timestamp getTimestamp(final int columnIndex, final Calendar cal)
throws SQLException {
throw new UnsupportedOperationException();
}
- public Timestamp getTimestamp(String columnName, Calendar cal)
+ public Timestamp getTimestamp(final String columnName, final Calendar cal)
throws SQLException {
throw new UnsupportedOperationException();
}
@@ -563,24 +563,24 @@ public class TestResultSet implements In
/** @deprecated */
@Deprecated
- public InputStream getUnicodeStream(int columnIndex) throws SQLException {
+ public InputStream getUnicodeStream(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
/** @deprecated */
@Deprecated
- public InputStream getUnicodeStream(String columnName) throws SQLException {
+ public InputStream getUnicodeStream(final String columnName) throws SQLException {
throw new UnsupportedOperationException();
}
- public URL getURL(int columnIndex) throws SQLException {
+ public URL getURL(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public URL getURL(String columnName) throws SQLException {
+ public URL getURL(final String columnName) throws SQLException {
throw new UnsupportedOperationException();
}
@@ -640,7 +640,7 @@ public class TestResultSet implements In
}
- public boolean relative(int rows) throws SQLException {
+ public boolean relative(final int rows) throws SQLException {
throw new UnsupportedOperationException();
}
@@ -660,233 +660,233 @@ public class TestResultSet implements In
}
- public void setFetchDirection(int direction) throws SQLException {
+ public void setFetchDirection(final int direction) throws SQLException {
throw new UnsupportedOperationException();
}
- public void setFetchSize(int size) throws SQLException {
+ public void setFetchSize(final int size) throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateArray(int columnPosition, Array x)
+ public void updateArray(final int columnPosition, final Array x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateArray(String columnName, Array x)
+ public void updateArray(final String columnName, final Array x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateAsciiStream(int columnPosition, InputStream x, int len)
+ public void updateAsciiStream(final int columnPosition, final InputStream x, final int len)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateAsciiStream(String columnName, InputStream x, int len)
+ public void updateAsciiStream(final String columnName, final InputStream x, final int len)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateBigDecimal(int columnPosition, BigDecimal x)
+ public void updateBigDecimal(final int columnPosition, final BigDecimal x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateBigDecimal(String columnName, BigDecimal x)
+ public void updateBigDecimal(final String columnName, final BigDecimal x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateBinaryStream(int columnPosition, InputStream x, int len)
+ public void updateBinaryStream(final int columnPosition, final InputStream x, final int len)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateBinaryStream(String columnName, InputStream x, int len)
+ public void updateBinaryStream(final String columnName, final InputStream x, final int len)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateBlob(int columnPosition, Blob x)
+ public void updateBlob(final int columnPosition, final Blob x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateBlob(String columnName, Blob x)
+ public void updateBlob(final String columnName, final Blob x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateBoolean(int columnPosition, boolean x)
+ public void updateBoolean(final int columnPosition, final boolean x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateBoolean(String columnName, boolean x)
+ public void updateBoolean(final String columnName, final boolean x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateByte(int columnPosition, byte x)
+ public void updateByte(final int columnPosition, final byte x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateByte(String columnName, byte x)
+ public void updateByte(final String columnName, final byte x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateBytes(int columnPosition, byte x[])
+ public void updateBytes(final int columnPosition, final byte x[])
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateBytes(String columnName, byte x[])
+ public void updateBytes(final String columnName, final byte x[])
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateCharacterStream(int columnPosition, Reader x, int len)
+ public void updateCharacterStream(final int columnPosition, final Reader x, final int len)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateCharacterStream(String columnName, Reader x, int len)
+ public void updateCharacterStream(final String columnName, final Reader x, final int len)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateClob(int columnPosition, Clob x)
+ public void updateClob(final int columnPosition, final Clob x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateClob(String columnName, Clob x)
+ public void updateClob(final String columnName, final Clob x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateDate(int columnPosition, Date x)
+ public void updateDate(final int columnPosition, final Date x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateDate(String columnName, Date x)
+ public void updateDate(final String columnName, final Date x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateDouble(int columnPosition, double x)
+ public void updateDouble(final int columnPosition, final double x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateDouble(String columnName, double x)
+ public void updateDouble(final String columnName, final double x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateFloat(int columnPosition, float x)
+ public void updateFloat(final int columnPosition, final float x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateFloat(String columnName, float x)
+ public void updateFloat(final String columnName, final float x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateInt(int columnPosition, int x)
+ public void updateInt(final int columnPosition, final int x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateInt(String columnName, int x)
+ public void updateInt(final String columnName, final int x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateLong(int columnPosition, long x)
+ public void updateLong(final int columnPosition, final long x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateLong(String columnName, long x)
+ public void updateLong(final String columnName, final long x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateNull(int columnPosition)
+ public void updateNull(final int columnPosition)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateNull(String columnName)
+ public void updateNull(final String columnName)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateObject(int columnPosition, Object x)
+ public void updateObject(final int columnPosition, final Object x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateObject(int columnPosition, Object x, int scale)
+ public void updateObject(final int columnPosition, final Object x, final int scale)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateObject(String columnName, Object x, int scale)
+ public void updateObject(final String columnName, final Object x, final int scale)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateRef(int columnPosition, Ref x)
+ public void updateRef(final int columnPosition, final Ref x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateRef(String columnName, Ref x)
+ public void updateRef(final String columnName, final Ref x)
throws SQLException {
throw new UnsupportedOperationException();
}
@@ -897,49 +897,49 @@ public class TestResultSet implements In
}
- public void updateShort(int columnPosition, short x)
+ public void updateShort(final int columnPosition, final short x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateShort(String columnName, short x)
+ public void updateShort(final String columnName, final short x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateString(int columnPosition, String x)
+ public void updateString(final int columnPosition, final String x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateString(String columnName, String x)
+ public void updateString(final String columnName, final String x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateTime(int columnPosition, Time x)
+ public void updateTime(final int columnPosition, final Time x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateTime(String columnName, Time x)
+ public void updateTime(final String columnName, final Time x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateTimestamp(int columnPosition, Timestamp x)
+ public void updateTimestamp(final int columnPosition, final Timestamp x)
throws SQLException {
throw new UnsupportedOperationException();
}
- public void updateTimestamp(String columnName, Timestamp x)
+ public void updateTimestamp(final String columnName, final Timestamp x)
throws SQLException {
throw new UnsupportedOperationException();
}
Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/TestResultSetMetaData.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/TestResultSetMetaData.java?rev=1632171&r1=1632170&r2=1632171&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/TestResultSetMetaData.java (original)
+++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/TestResultSetMetaData.java Wed Oct 15 20:15:17 2014
@@ -75,9 +75,9 @@ public class TestResultSetMetaData imple
* @param invocationHandler Invocation Handler
* @return A result set meta data proxy
*/
- public static ResultSetMetaData createProxy(InvocationHandler invocationHandler) {
- ClassLoader classLoader = ResultSetMetaData.class.getClassLoader();
- Class<?>[] interfaces = new Class[] { ResultSetMetaData.class };
+ public static ResultSetMetaData createProxy(final InvocationHandler invocationHandler) {
+ final ClassLoader classLoader = ResultSetMetaData.class.getClassLoader();
+ final Class<?>[] interfaces = new Class[] { ResultSetMetaData.class };
return (ResultSetMetaData)Proxy.newProxyInstance(classLoader, interfaces, invocationHandler);
}
@@ -90,8 +90,8 @@ public class TestResultSetMetaData imple
* @return The result of invoking the method.
* @throws Throwable if an error occurs.
*/
- public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
- String methodName = method.getName();
+ public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {
+ final String methodName = method.getName();
if ("getColumnClassName".equals(methodName)) {
return getColumnClassName(((Integer)args[0]).intValue());
} if ("getColumnCount".equals(methodName)) {
@@ -108,7 +108,7 @@ public class TestResultSetMetaData imple
// ---------------------------------------------------- Implemented Methods
- public String getColumnClassName(int columnIndex) throws SQLException {
+ public String getColumnClassName(final int columnIndex) throws SQLException {
return (metadata[columnIndex - 1][1]);
}
@@ -117,13 +117,13 @@ public class TestResultSetMetaData imple
return (metadata.length);
}
- public String getColumnName(int columnIndex) throws SQLException {
+ public String getColumnName(final int columnIndex) throws SQLException {
return (metadata[columnIndex - 1][0]);
}
- public Integer getColumnType(int columnIndex) throws SQLException {
- String columnName = getColumnName(columnIndex);
+ public Integer getColumnType(final int columnIndex) throws SQLException {
+ final String columnName = getColumnName(columnIndex);
int sqlType = Types.OTHER;
if (columnName.equals("bigDecimalProperty")) {
sqlType = Types.DECIMAL;
@@ -162,87 +162,87 @@ public class TestResultSetMetaData imple
// -------------------------------------------------- Unimplemented Methods
- public String getCatalogName(int columnIndex) throws SQLException {
+ public String getCatalogName(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public int getColumnDisplaySize(int columnIndex) throws SQLException {
+ public int getColumnDisplaySize(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public String getColumnLabel(int columnIndex) throws SQLException {
+ public String getColumnLabel(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public String getColumnTypeName(int columnIndex) throws SQLException {
+ public String getColumnTypeName(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public int getPrecision(int columnIndex) throws SQLException {
+ public int getPrecision(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public int getScale(int columnIndex) throws SQLException {
+ public int getScale(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public String getSchemaName(int columnIndex) throws SQLException {
+ public String getSchemaName(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public String getTableName(int columnIndex) throws SQLException {
+ public String getTableName(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public boolean isAutoIncrement(int columnIndex) throws SQLException {
+ public boolean isAutoIncrement(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public boolean isCaseSensitive(int columnIndex) throws SQLException {
+ public boolean isCaseSensitive(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public boolean isCurrency(int columnIndex) throws SQLException {
+ public boolean isCurrency(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public boolean isDefinitelyWritable(int columnIndex) throws SQLException {
+ public boolean isDefinitelyWritable(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public int isNullable(int columnIndex) throws SQLException {
+ public int isNullable(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public boolean isReadOnly(int columnIndex) throws SQLException {
+ public boolean isReadOnly(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public boolean isSearchable(int columnIndex) throws SQLException {
+ public boolean isSearchable(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public boolean isSigned(int columnIndex) throws SQLException {
+ public boolean isSigned(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
- public boolean isWritable(int columnIndex) throws SQLException {
+ public boolean isWritable(final int columnIndex) throws SQLException {
throw new UnsupportedOperationException();
}
Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/ThrowExceptionConverter.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/ThrowExceptionConverter.java?rev=1632171&r1=1632170&r2=1632171&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/ThrowExceptionConverter.java (original)
+++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/ThrowExceptionConverter.java Wed Oct 15 20:15:17 2014
@@ -30,7 +30,7 @@ package org.apache.commons.beanutils;
public class ThrowExceptionConverter implements Converter {
- public <T> T convert(Class<T> type, Object value) {
+ public <T> T convert(final Class<T> type, final Object value) {
throw new PassTestException();
}
}
Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/WrapDynaBeanTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/WrapDynaBeanTestCase.java?rev=1632171&r1=1632170&r2=1632171&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/WrapDynaBeanTestCase.java (original)
+++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/WrapDynaBeanTestCase.java Wed Oct 15 20:15:17 2014
@@ -49,7 +49,7 @@ public class WrapDynaBeanTestCase extend
*
* @param name Name of the test case
*/
- public WrapDynaBeanTestCase(String name) {
+ public WrapDynaBeanTestCase(final String name) {
super(name);
@@ -114,7 +114,7 @@ public class WrapDynaBeanTestCase extend
try {
bean.get("invalidProperty");
fail("Invalid get should have thrown IllegalArgumentException");
- } catch (IllegalArgumentException t) {
+ } catch (final IllegalArgumentException t) {
// Expected result
}
@@ -122,14 +122,14 @@ public class WrapDynaBeanTestCase extend
try {
bean.set("invalidProperty", "XYZ");
fail("Invalid set should have thrown IllegalArgumentException");
- } catch (IllegalArgumentException t) {
+ } catch (final IllegalArgumentException t) {
// Expected result
}
// Set up initial Value
String testValue = "Original Value";
- String testProperty = "stringProperty";
- TestBean instance = (TestBean)((WrapDynaBean)bean).getInstance();
+ final String testProperty = "stringProperty";
+ final TestBean instance = (TestBean)((WrapDynaBean)bean).getInstance();
instance.setStringProperty(testValue);
assertEquals("Check String property", testValue, instance.getStringProperty());
@@ -139,7 +139,7 @@ public class WrapDynaBeanTestCase extend
bean.set(testProperty, testValue);
assertEquals("Test Set", testValue, instance.getStringProperty());
assertEquals("Test Get", testValue, bean.get(testProperty));
- } catch (IllegalArgumentException t) {
+ } catch (final IllegalArgumentException t) {
fail("Get threw exception: " + t);
}
}
@@ -153,7 +153,7 @@ public class WrapDynaBeanTestCase extend
try {
bean.get("invalidProperty", 0);
fail("Invalid get should have thrown IllegalArgumentException");
- } catch (IllegalArgumentException t) {
+ } catch (final IllegalArgumentException t) {
// Expected result
}
@@ -161,14 +161,14 @@ public class WrapDynaBeanTestCase extend
try {
bean.set("invalidProperty", 0, "XYZ");
fail("Invalid set should have thrown IllegalArgumentException");
- } catch (IllegalArgumentException t) {
+ } catch (final IllegalArgumentException t) {
// Expected result
}
// Set up initial Value
String testValue = "Original Value";
- String testProperty = "stringIndexed";
- TestBean instance = (TestBean)((WrapDynaBean)bean).getInstance();
+ final String testProperty = "stringIndexed";
+ final TestBean instance = (TestBean)((WrapDynaBean)bean).getInstance();
instance.setStringIndexed(0, testValue);
assertEquals("Check String property", testValue, instance.getStringIndexed(0));
@@ -178,7 +178,7 @@ public class WrapDynaBeanTestCase extend
bean.set(testProperty, 0, testValue);
assertEquals("Test Set", testValue, instance.getStringIndexed(0));
assertEquals("Test Get", testValue, bean.get(testProperty, 0));
- } catch (IllegalArgumentException t) {
+ } catch (final IllegalArgumentException t) {
fail("Get threw exception: " + t);
}
@@ -195,9 +195,9 @@ public class WrapDynaBeanTestCase extend
assertTrue("Can see first key",
bean.contains("mappedProperty", "First Key"));
fail("Should have thrown UnsupportedOperationException");
- } catch (UnsupportedOperationException t) {
+ } catch (final UnsupportedOperationException t) {
// Expected result
- } catch (Throwable t) {
+ } catch (final Throwable t) {
fail("Exception: " + t);
}
@@ -206,9 +206,9 @@ public class WrapDynaBeanTestCase extend
assertTrue("Can not see unknown key",
!bean.contains("mappedProperty", "Unknown Key"));
fail("Should have thrown UnsupportedOperationException");
- } catch (UnsupportedOperationException t) {
+ } catch (final UnsupportedOperationException t) {
// Expected result
- } catch (Throwable t) {
+ } catch (final Throwable t) {
fail("Exception: " + t);
}
@@ -229,9 +229,9 @@ public class WrapDynaBeanTestCase extend
fail("Should have thrown UnsupportedOperationException");
// assertTrue("Can not see first key",
// !bean.contains("mappedProperty", "First Key"));
- } catch (UnsupportedOperationException t) {
+ } catch (final UnsupportedOperationException t) {
// Expected result
- } catch (Throwable t) {
+ } catch (final Throwable t) {
fail("Exception: " + t);
}
@@ -242,9 +242,9 @@ public class WrapDynaBeanTestCase extend
fail("Should have thrown UnsupportedOperationException");
// assertTrue("Can not see unknown key",
// !bean.contains("mappedProperty", "Unknown Key"));
- } catch (UnsupportedOperationException t) {
+ } catch (final UnsupportedOperationException t) {
// Expected result
- } catch (Throwable t) {
+ } catch (final Throwable t) {
fail("Exception: " + t);
}
@@ -252,20 +252,20 @@ public class WrapDynaBeanTestCase extend
/** Tests getInstance method */
public void testGetInstance() {
- AlphaBean alphaBean = new AlphaBean("Now On Air... John Peel");
- WrapDynaBean dynaBean = new WrapDynaBean(alphaBean);
- Object wrappedInstance = dynaBean.getInstance();
+ final AlphaBean alphaBean = new AlphaBean("Now On Air... John Peel");
+ final WrapDynaBean dynaBean = new WrapDynaBean(alphaBean);
+ final Object wrappedInstance = dynaBean.getInstance();
assertTrue("Object type is AlphaBean", wrappedInstance instanceof AlphaBean);
- AlphaBean wrappedAlphaBean = (AlphaBean) wrappedInstance;
+ final AlphaBean wrappedAlphaBean = (AlphaBean) wrappedInstance;
assertTrue("Same Object", wrappedAlphaBean == alphaBean);
}
/** Tests the newInstance implementation for WrapDynaClass */
public void testNewInstance() throws Exception {
- WrapDynaClass dynaClass = WrapDynaClass.createDynaClass(AlphaBean.class);
- Object createdInstance = dynaClass.newInstance();
+ final WrapDynaClass dynaClass = WrapDynaClass.createDynaClass(AlphaBean.class);
+ final Object createdInstance = dynaClass.newInstance();
assertTrue("Object type is WrapDynaBean", createdInstance instanceof WrapDynaBean);
- WrapDynaBean dynaBean = (WrapDynaBean) createdInstance;
+ final WrapDynaBean dynaBean = (WrapDynaBean) createdInstance;
assertTrue("Object type is AlphaBean", dynaBean.getInstance() instanceof AlphaBean);
}
@@ -278,14 +278,14 @@ public class WrapDynaBeanTestCase extend
public void testSerialization() {
// Create a bean and set a value
- WrapDynaBean origBean = new WrapDynaBean(new TestBean());
- Integer newValue = new Integer(789);
+ final WrapDynaBean origBean = new WrapDynaBean(new TestBean());
+ final Integer newValue = new Integer(789);
assertEquals("origBean default", new Integer(123), origBean.get("intProperty"));
origBean.set("intProperty", newValue);
assertEquals("origBean new value", newValue, origBean.get("intProperty"));
// Serialize/Deserialize & test value
- WrapDynaBean bean = (WrapDynaBean)serializeDeserialize(origBean, "First Test");
+ final WrapDynaBean bean = (WrapDynaBean)serializeDeserialize(origBean, "First Test");
assertEquals("bean value", newValue, bean.get("intProperty"));
}
@@ -293,28 +293,28 @@ public class WrapDynaBeanTestCase extend
/**
* Do serialization and deserialization.
*/
- private Object serializeDeserialize(Object target, String text) {
+ private Object serializeDeserialize(final Object target, final String text) {
// Serialize the test object
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ final ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
- ObjectOutputStream oos = new ObjectOutputStream(baos);
+ final ObjectOutputStream oos = new ObjectOutputStream(baos);
oos.writeObject(target);
oos.flush();
oos.close();
- } catch (Exception e) {
+ } catch (final Exception e) {
fail(text + ": Exception during serialization: " + e);
}
// Deserialize the test object
Object result = null;
try {
- ByteArrayInputStream bais =
+ final ByteArrayInputStream bais =
new ByteArrayInputStream(baos.toByteArray());
- ObjectInputStream ois = new ObjectInputStream(bais);
+ final ObjectInputStream ois = new ObjectInputStream(bais);
result = ois.readObject();
bais.close();
- } catch (Exception e) {
+ } catch (final Exception e) {
fail(text + ": Exception during deserialization: " + e);
}
return result;
@@ -325,7 +325,7 @@ public class WrapDynaBeanTestCase extend
* Tests whether a WrapDynaClass can be provided when constructing a bean.
*/
public void testInitWithDynaClass() {
- WrapDynaClass clazz = WrapDynaClass.createDynaClass(TestBean.class);
+ final WrapDynaClass clazz = WrapDynaClass.createDynaClass(TestBean.class);
bean = new WrapDynaBean(new TestBean(), clazz);
assertSame("Wrong DynaClass", clazz, bean.getDynaClass());
checkSimplePropertyAccess();
@@ -335,7 +335,7 @@ public class WrapDynaBeanTestCase extend
* Tests whether caching works for WrapDynaClass objects.
*/
public void testGetWrapDynaClassFromCache() {
- WrapDynaClass clazz = WrapDynaClass.createDynaClass(TestBean.class);
+ final WrapDynaClass clazz = WrapDynaClass.createDynaClass(TestBean.class);
assertSame("Instance not cached", clazz,
WrapDynaClass.createDynaClass(TestBean.class));
}
@@ -345,9 +345,9 @@ public class WrapDynaBeanTestCase extend
* taken into account when accessing an instance from the cache.
*/
public void testGetWrapDynaClassFromCacheWithPropUtils() {
- WrapDynaClass clazz = WrapDynaClass.createDynaClass(TestBean.class);
- PropertyUtilsBean pu = new PropertyUtilsBean();
- WrapDynaClass clazz2 = WrapDynaClass.createDynaClass(TestBean.class, pu);
+ final WrapDynaClass clazz = WrapDynaClass.createDynaClass(TestBean.class);
+ final PropertyUtilsBean pu = new PropertyUtilsBean();
+ final WrapDynaClass clazz2 = WrapDynaClass.createDynaClass(TestBean.class, pu);
assertNotSame("Got same instance from cache", clazz, clazz2);
}
@@ -356,11 +356,11 @@ public class WrapDynaBeanTestCase extend
* bean properties.
*/
public void testIntrospectionWithCustomPropUtils() {
- PropertyUtilsBean pu = new PropertyUtilsBean();
+ final PropertyUtilsBean pu = new PropertyUtilsBean();
pu.addBeanIntrospector(new FluentPropertyBeanIntrospector());
- WrapDynaClass dynaClass = WrapDynaClass.createDynaClass(
+ final WrapDynaClass dynaClass = WrapDynaClass.createDynaClass(
FluentIntrospectionTestBean.class, pu);
- FluentIntrospectionTestBean obj = new FluentIntrospectionTestBean();
+ final FluentIntrospectionTestBean obj = new FluentIntrospectionTestBean();
bean = new WrapDynaBean(obj, dynaClass);
bean.set("fluentProperty", "testvalue");
assertEquals("Property not set", "testvalue", obj.getStringProperty());
Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/bugs/Jira157TestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/bugs/Jira157TestCase.java?rev=1632171&r1=1632170&r2=1632171&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/bugs/Jira157TestCase.java (original)
+++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/bugs/Jira157TestCase.java Wed Oct 15 20:15:17 2014
@@ -44,7 +44,7 @@ public class Jira157TestCase extends Tes
*
* @param name The name of the test
*/
- public Jira157TestCase(String name) {
+ public Jira157TestCase(final String name) {
super(name);
}
@@ -53,7 +53,7 @@ public class Jira157TestCase extends Tes
*
* @param args Arguments
*/
- public static void main(String[] args) {
+ public static void main(final String[] args) {
junit.textui.TestRunner.run(suite());
}
@@ -93,7 +93,7 @@ public class Jira157TestCase extends Tes
* See Jira issue# BEANUTILS-157.
*/
public void testIssue_BEANUTILS_157_BeanUtils_Describe_Serializable() {
- Object bean = new Serializable() {
+ final Object bean = new Serializable() {
private static final long serialVersionUID = 1L;
@SuppressWarnings("unused")
@@ -108,7 +108,7 @@ public class Jira157TestCase extends Tes
Map<String, String> result = null;
try {
result = BeanUtils.describe(bean);
- } catch (Throwable t) {
+ } catch (final Throwable t) {
log.error("Describe Serializable: " + t.getMessage(), t);
fail("Describe Serializable Threw exception: " + t);
}
@@ -123,7 +123,7 @@ public class Jira157TestCase extends Tes
* See Jira issue# BEANUTILS-157.
*/
public void testIssue_BEANUTILS_157_BeanUtils_Describe_Interface() {
- Object bean = new XY() {
+ final Object bean = new XY() {
public String getX() {
return "x-value";
}
@@ -134,7 +134,7 @@ public class Jira157TestCase extends Tes
Map<String, String> result = null;
try {
result = BeanUtils.describe(bean);
- } catch (Throwable t) {
+ } catch (final Throwable t) {
log.error("Describe Interface: " + t.getMessage(), t);
fail("Describe Interface Threw exception: " + t);
}
@@ -153,11 +153,11 @@ public class Jira157TestCase extends Tes
* See Jira issue# BEANUTILS-157.
*/
public void testIssue_BEANUTILS_157_BeanUtils_Describe_Bean() {
- Object bean = new FooBar();
+ final Object bean = new FooBar();
Map<String, String> result = null;
try {
result = BeanUtils.describe(bean);
- } catch (Throwable t) {
+ } catch (final Throwable t) {
log.error("Describe Bean: " + t.getMessage(), t);
fail("Describe Bean Threw exception: " + t);
}
Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/bugs/Jira18TestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/bugs/Jira18TestCase.java?rev=1632171&r1=1632170&r2=1632171&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/bugs/Jira18TestCase.java (original)
+++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/bugs/Jira18TestCase.java Wed Oct 15 20:15:17 2014
@@ -43,7 +43,7 @@ public class Jira18TestCase extends Test
*
* @param name The name of the test
*/
- public Jira18TestCase(String name) {
+ public Jira18TestCase(final String name) {
super(name);
}
@@ -52,7 +52,7 @@ public class Jira18TestCase extends Test
*
* @param args Arguments
*/
- public static void main(String[] args) {
+ public static void main(final String[] args) {
junit.textui.TestRunner.run(suite());
}
@@ -94,7 +94,7 @@ public class Jira18TestCase extends Test
boolean result = false;
try {
result = PropertyUtils.isReadable(bean, "simple");
- } catch (Throwable t) {
+ } catch (final Throwable t) {
log.error("ERROR " + t, t);
fail("Threw exception: " + t);
}
@@ -109,7 +109,7 @@ public class Jira18TestCase extends Test
boolean result = false;
try {
result = PropertyUtils.isWriteable(bean, "simple");
- } catch (Throwable t) {
+ } catch (final Throwable t) {
log.error("ERROR " + t, t);
fail("Threw exception: " + t);
}
@@ -124,7 +124,7 @@ public class Jira18TestCase extends Test
boolean result = false;
try {
result = PropertyUtils.isReadable(bean, "indexed");
- } catch (Throwable t) {
+ } catch (final Throwable t) {
log.error("ERROR " + t, t);
fail("Threw exception: " + t);
}
@@ -139,7 +139,7 @@ public class Jira18TestCase extends Test
boolean result = false;
try {
result = PropertyUtils.isWriteable(bean, "indexed");
- } catch (Throwable t) {
+ } catch (final Throwable t) {
log.error("ERROR " + t, t);
fail("Threw exception: " + t);
}
@@ -154,7 +154,7 @@ public class Jira18TestCase extends Test
boolean result = false;
try {
result = PropertyUtils.isReadable(bean, "mapped");
- } catch (Throwable t) {
+ } catch (final Throwable t) {
log.error("ERROR " + t, t);
fail("Threw exception: " + t);
}
@@ -169,7 +169,7 @@ public class Jira18TestCase extends Test
boolean result = false;
try {
result = PropertyUtils.isWriteable(bean, "mapped");
- } catch (Throwable t) {
+ } catch (final Throwable t) {
log.error("ERROR " + t, t);
fail("Threw exception: " + t);
}
@@ -185,9 +185,9 @@ public class Jira18TestCase extends Test
Object result = null;
try {
result = PropertyUtils.getProperty(bean, "simple");
- } catch (NoSuchMethodException ex) {
+ } catch (final NoSuchMethodException ex) {
threwNoSuchMethodException = true; // expected result
- } catch (Throwable t) {
+ } catch (final Throwable t) {
log.error("ERROR " + t, t);
fail("Threw exception: " + t);
}
@@ -202,9 +202,9 @@ public class Jira18TestCase extends Test
boolean threwNoSuchMethodException = false;
try {
PropertyUtils.setProperty(bean, "simple", "BAR");
- } catch (NoSuchMethodException ex) {
+ } catch (final NoSuchMethodException ex) {
threwNoSuchMethodException = true; // expected result
- } catch (Throwable t) {
+ } catch (final Throwable t) {
log.error("ERROR " + t, t);
fail("Threw exception: " + t);
}
@@ -220,9 +220,9 @@ public class Jira18TestCase extends Test
Object result = null;
try {
result = PropertyUtils.getProperty(bean, "indexed[0]");
- } catch (NoSuchMethodException ex) {
+ } catch (final NoSuchMethodException ex) {
threwNoSuchMethodException = true; // expected result
- } catch (Throwable t) {
+ } catch (final Throwable t) {
log.error("ERROR " + t, t);
fail("Threw exception: " + t);
}
@@ -237,9 +237,9 @@ public class Jira18TestCase extends Test
boolean threwNoSuchMethodException = false;
try {
PropertyUtils.setProperty(bean, "indexed[0]", "BAR");
- } catch (NoSuchMethodException ex) {
+ } catch (final NoSuchMethodException ex) {
threwNoSuchMethodException = true; // expected result
- } catch (Throwable t) {
+ } catch (final Throwable t) {
log.error("ERROR " + t, t);
fail("Threw exception: " + t);
}
@@ -255,9 +255,9 @@ public class Jira18TestCase extends Test
Object result = null;
try {
result = PropertyUtils.getProperty(bean, "mapped(foo-key)");
- } catch (NoSuchMethodException ex) {
+ } catch (final NoSuchMethodException ex) {
threwNoSuchMethodException = true; // expected result
- } catch (Throwable t) {
+ } catch (final Throwable t) {
log.error("ERROR " + t, t);
fail("Threw exception: " + t);
}
@@ -272,9 +272,9 @@ public class Jira18TestCase extends Test
boolean threwNoSuchMethodException = false;
try {
PropertyUtils.setProperty(bean, "mapped(foo-key)", "BAR");
- } catch (NoSuchMethodException ex) {
+ } catch (final NoSuchMethodException ex) {
threwNoSuchMethodException = true; // expected result
- } catch (Throwable t) {
+ } catch (final Throwable t) {
log.error("ERROR " + t, t);
fail("Threw exception: " + t);
}
Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/bugs/Jira273TestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/bugs/Jira273TestCase.java?rev=1632171&r1=1632170&r2=1632171&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/bugs/Jira273TestCase.java (original)
+++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/bugs/Jira273TestCase.java Wed Oct 15 20:15:17 2014
@@ -41,7 +41,7 @@ public class Jira273TestCase extends Tes
*
* @param name The name of the test
*/
- public Jira273TestCase(String name) {
+ public Jira273TestCase(final String name) {
super(name);
}
@@ -50,7 +50,7 @@ public class Jira273TestCase extends Tes
*
* @param args Arguments
*/
- public static void main(String[] args) {
+ public static void main(final String[] args) {
junit.textui.TestRunner.run(suite());
}
@@ -88,11 +88,11 @@ public class Jira273TestCase extends Tes
* of a public class.
*/
public void testIssue_BEANUTILS_273_AnnonymousOverriden() {
- Object bean = Jira273BeanFactory.createAnnonymousOverriden();
+ final Object bean = Jira273BeanFactory.createAnnonymousOverriden();
Object result = null;
try {
result = PropertyUtils.getProperty(bean, "beanValue");
- } catch (Throwable t) {
+ } catch (final Throwable t) {
log.error("AnnonymousOverriden: " + t.getMessage(), t);
fail("AnnonymousOverriden Threw exception: " + t);
}
@@ -104,11 +104,11 @@ public class Jira273TestCase extends Tes
* of a public class.
*/
public void testIssue_BEANUTILS_273_AnnonymousNotOverriden() {
- Object bean = Jira273BeanFactory.createAnnonymousNotOverriden();
+ final Object bean = Jira273BeanFactory.createAnnonymousNotOverriden();
Object result = null;
try {
result = PropertyUtils.getProperty(bean, "beanValue");
- } catch (Throwable t) {
+ } catch (final Throwable t) {
log.error("AnnonymousNotOverriden: " + t.getMessage(), t);
fail("AnnonymousNotOverriden Threw exception: " + t);
}
@@ -120,11 +120,11 @@ public class Jira273TestCase extends Tes
* of a public class.
*/
public void testIssue_BEANUTILS_273_PrivatePublicNotOverriden() {
- Object bean = Jira273BeanFactory.createPrivatePublicNotOverriden();
+ final Object bean = Jira273BeanFactory.createPrivatePublicNotOverriden();
Object result = null;
try {
result = PropertyUtils.getProperty(bean, "beanValue");
- } catch (Throwable t) {
+ } catch (final Throwable t) {
log.error("PrivatePublicNotOverriden: " + t.getMessage(), t);
fail("PrivatePublicNotOverriden Threw exception: " + t);
}
@@ -136,11 +136,11 @@ public class Jira273TestCase extends Tes
* of a public class.
*/
public void testIssue_BEANUTILS_273_PrivatePublicOverriden() {
- Object bean = Jira273BeanFactory.createPrivatePublicOverriden();
+ final Object bean = Jira273BeanFactory.createPrivatePublicOverriden();
Object result = null;
try {
result = PropertyUtils.getProperty(bean, "beanValue");
- } catch (Throwable t) {
+ } catch (final Throwable t) {
log.error("PrivatePublicOverriden: " + t.getMessage(), t);
fail("PrivatePublicOverriden Threw exception: " + t);
}
@@ -152,11 +152,11 @@ public class Jira273TestCase extends Tes
* of a "grand parent" public class.
*/
public void testIssue_BEANUTILS_273_PrivatePrivatePublicNotOverriden() {
- Object bean = Jira273BeanFactory.createPrivatePrivatePublicNotOverriden();
+ final Object bean = Jira273BeanFactory.createPrivatePrivatePublicNotOverriden();
Object result = null;
try {
result = PropertyUtils.getProperty(bean, "beanValue");
- } catch (Throwable t) {
+ } catch (final Throwable t) {
log.error("PrivatePrivatePublicNotOverriden: " + t.getMessage(), t);
fail("PrivatePrivatePublicNotOverriden Threw exception: " + t);
}
@@ -168,11 +168,11 @@ public class Jira273TestCase extends Tes
* of a "grand parent" public class.
*/
public void testIssue_BEANUTILS_273_PrivatePrivatePublicOverriden() {
- Object bean = Jira273BeanFactory.createPrivatePrivatePublicOverriden();
+ final Object bean = Jira273BeanFactory.createPrivatePrivatePublicOverriden();
Object result = null;
try {
result = PropertyUtils.getProperty(bean, "beanValue");
- } catch (Throwable t) {
+ } catch (final Throwable t) {
log.error("PrivatePrivatePublicOverriden: " + t.getMessage(), t);
fail("PrivatePrivatePublicOverriden Threw exception: " + t);
}
Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/bugs/Jira298TestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/bugs/Jira298TestCase.java?rev=1632171&r1=1632170&r2=1632171&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/bugs/Jira298TestCase.java (original)
+++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/bugs/Jira298TestCase.java Wed Oct 15 20:15:17 2014
@@ -42,7 +42,7 @@ public class Jira298TestCase extends Tes
*
* @param name The name of the test
*/
- public Jira298TestCase(String name) {
+ public Jira298TestCase(final String name) {
super(name);
}
@@ -51,7 +51,7 @@ public class Jira298TestCase extends Tes
*
* @param args Arguments
*/
- public static void main(String[] args) {
+ public static void main(final String[] args) {
junit.textui.TestRunner.run(suite());
}
@@ -88,11 +88,11 @@ public class Jira298TestCase extends Tes
* Test {@link PropertyUtils#getProperty(Object, String)}
*/
public void testIssue_BEANUTILS_298_PropertyUtils_getProperty() {
- Object bean = Jira298BeanFactory.createImplX();
+ final Object bean = Jira298BeanFactory.createImplX();
Object result = null;
try {
result = PropertyUtils.getProperty(bean, "name");
- } catch (Throwable t) {
+ } catch (final Throwable t) {
log.error("Failed: " + t.getMessage(), t);
fail("Threw exception: " + t);
}
@@ -103,11 +103,11 @@ public class Jira298TestCase extends Tes
* Test {@link PropertyUtils#setProperty(Object, String, Object)}
*/
public void testIssue_BEANUTILS_298_PropertyUtils_setProperty() {
- Object bean = Jira298BeanFactory.createImplX();
+ final Object bean = Jira298BeanFactory.createImplX();
assertEquals("BaseX name value", ((IX)bean).getName());
try {
PropertyUtils.setProperty(bean, "name", "new name");
- } catch (Throwable t) {
+ } catch (final Throwable t) {
log.error("Failed: " + t.getMessage(), t);
fail("Threw exception: " + t);
}
@@ -118,12 +118,12 @@ public class Jira298TestCase extends Tes
* Test {@link MethodUtils#getAccessibleMethod(Class, Method)}
*/
public void testIssue_BEANUTILS_298_MethodUtils_getAccessibleMethod() {
- Object bean = Jira298BeanFactory.createImplX();
+ final Object bean = Jira298BeanFactory.createImplX();
Object result = null;
try {
- Method m2 = MethodUtils.getAccessibleMethod(bean.getClass(), "getName", new Class[0]);
+ final Method m2 = MethodUtils.getAccessibleMethod(bean.getClass(), "getName", new Class[0]);
result = m2.invoke(bean);
- } catch (Throwable t) {
+ } catch (final Throwable t) {
log.error("Failed: " + t.getMessage(), t);
fail("Threw exception: " + t);
}