commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r307189 - /jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/LazyDynaBean.java
Date Fri, 07 Oct 2005 20:35:55 GMT
Author: niallp
Date: Fri Oct  7 13:35:43 2005
New Revision: 307189

URL: http://svn.apache.org/viewcvs?rev=307189&view=rev
Log:
Revert back Log from being static to instance variable and make transient.

The Log instance variable was causing the LazyDynaList serialization test from working - I
changed it to static thinking it was an mistake - however this reverted the recent change
in revision 189535.

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

Modified: jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/LazyDynaBean.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/LazyDynaBean.java?rev=307189&r1=307188&r2=307189&view=diff
==============================================================================
--- jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/LazyDynaBean.java
(original)
+++ jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/LazyDynaBean.java
Fri Oct  7 13:35:43 2005
@@ -112,7 +112,7 @@
    /**
     * Commons Logging
     */
-    private static Log logger = LogFactory.getLog(LazyDynaBean.class);
+    private transient Log logger = LogFactory.getLog(LazyDynaBean.class);
 
     protected static final BigInteger BigInteger_ZERO = new BigInteger("0");
     protected static final BigDecimal BigDecimal_ZERO = new BigDecimal("0");
@@ -693,8 +693,8 @@
             return type.newInstance();
         }
         catch (Exception ex) {
-            if (logger.isWarnEnabled()) {
-                logger.warn("Error instantiating DynaBean property of type '" + type.getName()
+ "' for '" + name + "' " + ex);
+            if (logger().isWarnEnabled()) {
+                logger().warn("Error instantiating DynaBean property of type '" + type.getName()
+ "' for '" + name + "' " + ex);
             }
             return null;
         }
@@ -755,8 +755,8 @@
             return type.newInstance();
         }
         catch (Exception ex) {
-            if (logger.isWarnEnabled()) {
-                logger.warn("Error instantiating property of type '" + type.getName() + "'
for '" + name + "' " + ex);
+            if (logger().isWarnEnabled()) {
+                logger().warn("Error instantiating property of type '" + type.getName() +
"' for '" + name + "' " + ex);
             }
             return null;
         }
@@ -836,6 +836,16 @@
      */
     protected Map newMap() {
         return new HashMap();
+    }
+
+    /**
+     * <p>Returns the <code>Log</code>.
+     */
+    private Log logger() {
+        if (logger == null) {
+            logger = LogFactory.getLog(LazyDynaBean.class);
+        }
+        return logger;
     }
 
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message