commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From skitch...@apache.org
Subject svn commit: r189535 - in /jakarta/commons/proper/beanutils/trunk/src: java/org/apache/commons/beanutils/ java/org/apache/commons/beanutils/locale/ java/org/apache/commons/beanutils/locale/converters/ test/org/apache/commons/beanutils/locale/converters/
Date Wed, 08 Jun 2005 06:31:59 GMT
Author: skitching
Date: Tue Jun  7 23:31:58 2005
New Revision: 189535

URL: http://svn.apache.org/viewcvs?rev=189535&view=rev
Log:
Replace use of static Log objects with instance or local variables.
It isn't safe to use static Log objects in code that might be deployed
via a shared classloader as they will bind to the Log object from the
context classloader in use when the first use happens.

Modified:
    jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/LazyDynaBean.java
    jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/MethodUtils.java
    jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/BaseLocaleConverter.java
    jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/LocaleBeanUtils.java
    jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/LocaleBeanUtilsBean.java
    jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/converters/DateLocaleConverter.java
    jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/converters/DecimalLocaleConverter.java
    jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/converters/StringLocaleConverter.java
    jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/locale/converters/DateLocaleConverterTestCase.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=189535&r1=189534&r2=189535&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
Tue Jun  7 23:31:58 2005
@@ -112,7 +112,7 @@
    /**
     * Commons Logging
     */
-    private static Log logger = LogFactory.getLog(LazyDynaBean.class);
+    private Log logger = LogFactory.getLog(LazyDynaBean.class);
 
     protected static final BigInteger BigInteger_ZERO = new BigInteger("0");
     protected static final BigDecimal BigDecimal_ZERO = new BigDecimal("0");

Modified: jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/MethodUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/MethodUtils.java?rev=189535&r1=189534&r2=189535&view=diff
==============================================================================
--- jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/MethodUtils.java
(original)
+++ jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/MethodUtils.java
Tue Jun  7 23:31:58 2005
@@ -55,10 +55,6 @@
 
     // --------------------------------------------------------- Private Methods
     
-    /**
-     * All logging goes through this logger
-     */
-    private static Log log = LogFactory.getLog(MethodUtils.class);
     /** Only log warning about accessibility work around once */
     private static boolean loggedAccessibleWarning = false;
 
@@ -517,6 +513,7 @@
                                                 String methodName,
                                                 Class[] parameterTypes) {
         // trace logging
+        Log log = LogFactory.getLog(MethodUtils.class);
         if (log.isTraceEnabled()) {
             log.trace("Matching name=" + methodName + " on " + clazz);
         }
@@ -819,6 +816,7 @@
         } else if (Character.class.equals(wrapperType)) {
             return char.class;
         } else {
+            Log log = LogFactory.getLog(MethodUtils.class);
             if (log.isDebugEnabled()) {
                 log.debug("Not a known primitive wrapper class: " + wrapperType);
             }

Modified: jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/BaseLocaleConverter.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/BaseLocaleConverter.java?rev=189535&r1=189534&r2=189535&view=diff
==============================================================================
--- jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/BaseLocaleConverter.java
(original)
+++ jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/BaseLocaleConverter.java
Tue Jun  7 23:31:58 2005
@@ -40,7 +40,7 @@
     // ----------------------------------------------------- Instance Variables
 
     /** All logging goes through this logger */
-    private static Log log = LogFactory.getLog(BaseLocaleConverter.class);
+    private Log log = LogFactory.getLog(BaseLocaleConverter.class);
 
     /** The default value specified to our Constructor, if any. */
     private Object defaultValue = null;

Modified: jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/LocaleBeanUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/LocaleBeanUtils.java?rev=189535&r1=189534&r2=189535&view=diff
==============================================================================
--- jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/LocaleBeanUtils.java
(original)
+++ jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/LocaleBeanUtils.java
Tue Jun  7 23:31:58 2005
@@ -47,9 +47,6 @@
 
     // ----------------------------------------------------- Instance Variables
 
-    /** All logging goes through this logger */
-    private static Log log = LogFactory.getLog(LocaleBeanUtils.class);
-
     /**
      * <p>Gets the locale used when no locale is passed.</p>
      *
@@ -420,6 +417,8 @@
      */
     protected static Descriptor calculate(Object bean, String name)
             throws IllegalAccessException, InvocationTargetException {
+
+        Log log = LogFactory.getLog(LocaleBeanUtils.class);
 
         String propName = null;          // Simple name of target property
         int index = -1;                  // Indexed subscript value (if any)

Modified: jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/LocaleBeanUtilsBean.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/LocaleBeanUtilsBean.java?rev=189535&r1=189534&r2=189535&view=diff
==============================================================================
--- jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/LocaleBeanUtilsBean.java
(original)
+++ jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/LocaleBeanUtilsBean.java
Tue Jun  7 23:31:58 2005
@@ -69,7 +69,7 @@
 	}
 
     /** All logging goes through this logger */
-    private static Log log = LogFactory.getLog(LocaleBeanUtilsBean.class);
+    private Log log = LogFactory.getLog(LocaleBeanUtilsBean.class);
 
     // ----------------------------------------------------- Instance Variables
         

Modified: jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/converters/DateLocaleConverter.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/converters/DateLocaleConverter.java?rev=189535&r1=189534&r2=189535&view=diff
==============================================================================
--- jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/converters/DateLocaleConverter.java
(original)
+++ jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/converters/DateLocaleConverter.java
Tue Jun  7 23:31:58 2005
@@ -45,7 +45,7 @@
     // ----------------------------------------------------- Instance Variables
 
     /** All logging goes through this logger */
-    private static Log log = LogFactory.getLog(DateLocaleConverter.class);
+    private Log log = LogFactory.getLog(DateLocaleConverter.class);
 
     /** Should the date conversion be lenient? */
     boolean isLenient = false;

Modified: jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/converters/DecimalLocaleConverter.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/converters/DecimalLocaleConverter.java?rev=189535&r1=189534&r2=189535&view=diff
==============================================================================
--- jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/converters/DecimalLocaleConverter.java
(original)
+++ jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/converters/DecimalLocaleConverter.java
Tue Jun  7 23:31:58 2005
@@ -44,7 +44,7 @@
     // ----------------------------------------------------- Instance Variables
 
     /** All logging goes through this logger */
-    private static Log log = LogFactory.getLog(DecimalLocaleConverter.class);     
+    private Log log = LogFactory.getLog(DecimalLocaleConverter.class);     
 
     // ----------------------------------------------------------- Constructors
 

Modified: jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/converters/StringLocaleConverter.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/converters/StringLocaleConverter.java?rev=189535&r1=189534&r2=189535&view=diff
==============================================================================
--- jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/converters/StringLocaleConverter.java
(original)
+++ jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/converters/StringLocaleConverter.java
Tue Jun  7 23:31:58 2005
@@ -46,7 +46,7 @@
     // ----------------------------------------------------- Instance Variables
 
     /** All logging goes through this logger */
-    private static Log log = LogFactory.getLog(StringLocaleConverter.class);     //msz fix
+    private Log log = LogFactory.getLog(StringLocaleConverter.class);     //msz fix
 
 
     // ----------------------------------------------------------- Constructors

Modified: jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/locale/converters/DateLocaleConverterTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/locale/converters/DateLocaleConverterTestCase.java?rev=189535&r1=189534&r2=189535&view=diff
==============================================================================
--- jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/locale/converters/DateLocaleConverterTestCase.java
(original)
+++ jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/locale/converters/DateLocaleConverterTestCase.java
Tue Jun  7 23:31:58 2005
@@ -39,7 +39,7 @@
 public class DateLocaleConverterTestCase extends BaseLocaleConverterTestCase {
 
     /** All logging goes through this logger */
-    private static Log log = LogFactory.getLog(DateLocaleConverterTestCase.class);
+    private Log log = LogFactory.getLog(DateLocaleConverterTestCase.class);
 
     protected String localizedDatePattern; 
     protected String localizedDateValue;



---------------------------------------------------------------------
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