Removed an unnecessary null asignment git-svn-id: https://svn.apache.org/repos/asf/commons/proper/dbutils/branches/2_0@1481744 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/commons-dbutils/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-dbutils/commit/c05691b4 Tree: http://git-wip-us.apache.org/repos/asf/commons-dbutils/tree/c05691b4 Diff: http://git-wip-us.apache.org/repos/asf/commons-dbutils/diff/c05691b4 Branch: refs/heads/2_0 Commit: c05691b4ab237867c0d3f2f1d3dace0739f5e8ac Parents: dfeead1 Author: Emmanuel Bourg <[email protected]> Authored: Mon May 13 09:17:44 2013 +0000 Committer: Emmanuel Bourg <[email protected]> Committed: Mon May 13 09:17:44 2013 +0000 ---------------------------------------------------------------------- .../org/apache/commons/dbutils2/BeanProcessor.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-dbutils/blob/c05691b4/src/main/java/org/apache/commons/dbutils2/BeanProcessor.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/dbutils2/BeanProcessor.java b/src/main/java/org/apache/commons/dbutils2/BeanProcessor.java index 53e8515..6e621b5 100644 --- a/src/main/java/org/apache/commons/dbutils2/BeanProcessor.java +++ b/src/main/java/org/apache/commons/dbutils2/BeanProcessor.java @@ -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();
