Author: ebourg
Date: Mon May 13 09:17:44 2013
New Revision: 1481744
URL: http://svn.apache.org/r1481744
Log:
Removed an unnecessary null asignment
Modified:
commons/proper/dbutils/branches/2_0/src/main/java/org/apache/commons/dbutils2/BeanProcessor.java
Modified:
commons/proper/dbutils/branches/2_0/src/main/java/org/apache/commons/dbutils2/BeanProcessor.java
URL:
http://svn.apache.org/viewvc/commons/proper/dbutils/branches/2_0/src/main/java/org/apache/commons/dbutils2/BeanProcessor.java?rev=1481744&r1=1481743&r2=1481744&view=diff
==============================================================================
---
commons/proper/dbutils/branches/2_0/src/main/java/org/apache/commons/dbutils2/BeanProcessor.java
(original)
+++
commons/proper/dbutils/branches/2_0/src/main/java/org/apache/commons/dbutils2/BeanProcessor.java
Mon May 13 09:17:44 2013
@@ -355,12 +355,10 @@ public class BeanProcessor {
return c.newInstance();
} catch (InstantiationException e) {
- throw new SQLException(
- "Cannot create " + c.getName() + ": " + e.getMessage());
+ throw new SQLException("Cannot create " + c.getName() + ": " +
e.getMessage());
} catch (IllegalAccessException e) {
- throw new SQLException(
- "Cannot create " + c.getName() + ": " + e.getMessage());
+ throw new SQLException("Cannot create " + c.getName() + ": " +
e.getMessage());
}
}
@@ -371,16 +369,14 @@ public class BeanProcessor {
* @return A PropertyDescriptor[] describing the Class.
* @throws SQLException if introspection failed.
*/
- private PropertyDescriptor[] propertyDescriptors(Class<?> c)
- throws SQLException {
+ private PropertyDescriptor[] propertyDescriptors(Class<?> c) throws
SQLException {
// Introspector caches BeanInfo classes for better performance
- BeanInfo beanInfo = null;
+ BeanInfo beanInfo;
try {
beanInfo = Introspector.getBeanInfo(c);
} catch (IntrospectionException e) {
- throw new SQLException(
- "Bean introspection failed: " + e.getMessage());
+ throw new SQLException("Bean introspection failed: " +
e.getMessage());
}
return beanInfo.getPropertyDescriptors();