commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r812176 - /commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanMap.java
Date Mon, 07 Sep 2009 14:59:26 GMT
Author: sebb
Date: Mon Sep  7 14:59:25 2009
New Revision: 812176

URL: http://svn.apache.org/viewvc?rev=812176&view=rev
Log:
Make private static field final
Javadoc fix
getClass() cannot cause exception, so remove from try/catch

Modified:
    commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanMap.java

Modified: commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanMap.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanMap.java?rev=812176&r1=812175&r2=812176&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanMap.java (original)
+++ commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanMap.java Mon
Sep  7 14:59:25 2009
@@ -69,13 +69,13 @@
      *
      * N.B. private & unmodifiable replacement for the (public & static) defaultTransformers
instance.
      */
-    private static Map typeTransformers = Collections.unmodifiableMap(createTypeTransformers());
+    private static final Map typeTransformers = Collections.unmodifiableMap(createTypeTransformers());
 
     /**
      * This HashMap has been made unmodifiable to prevent issues when
      * loaded in a shared ClassLoader enviroment.
      *
-     * @see http://issues.apache.org/jira/browse/BEANUTILS-112
+     * @see "http://issues.apache.org/jira/browse/BEANUTILS-112"
      * @deprecated Use {@link BeanMap#getTypeTransformer(Class)} method
      */
     public static HashMap defaultTransformers = new HashMap() {
@@ -256,9 +256,8 @@
         }
 
         Object newBean = null;            
-        Class beanClass = null;
+        Class beanClass = bean.getClass(); // Cannot throw Exception
         try {
-            beanClass = bean.getClass();
             newBean = beanClass.newInstance();
         } catch (Exception e) {
             // unable to instantiate



Mime
View raw message