You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ni...@apache.org on 2006/03/10 01:36:38 UTC
svn commit: r384656 - in
/jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator:
GenericTypeValidator.java util/ValidatorUtils.java
Author: niallp
Date: Thu Mar 9 16:36:37 2006
New Revision: 384656
URL: http://svn.apache.org/viewcvs?rev=384656&view=rev
Log:
Remove remaining static Log instances
Modified:
jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/GenericTypeValidator.java
jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/util/ValidatorUtils.java
Modified: jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/GenericTypeValidator.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/GenericTypeValidator.java?rev=384656&r1=384655&r2=384656&view=diff
==============================================================================
--- jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/GenericTypeValidator.java (original)
+++ jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/GenericTypeValidator.java Thu Mar 9 16:36:37 2006
@@ -37,8 +37,6 @@
*/
public class GenericTypeValidator implements Serializable {
- private final static Log LOG = LogFactory.getLog(GenericTypeValidator.class);
-
/**
* Checks if the value can safely be converted to a byte primitive.
*
@@ -391,8 +389,9 @@
date = formatter.parse(value);
} catch (ParseException e) {
// Bad date so return null
- if (LOG.isDebugEnabled()) {
- LOG.debug("Date parse failed value=[" + value + "], " +
+ Log log = LogFactory.getLog(GenericTypeValidator.class);
+ if (log.isDebugEnabled()) {
+ log.debug("Date parse failed value=[" + value + "], " +
"locale=[" + locale + "] " + e);
}
}
@@ -436,8 +435,9 @@
}
} catch (ParseException e) {
// Bad date so return null
- if (LOG.isDebugEnabled()) {
- LOG.debug("Date parse failed value=[" + value + "], " +
+ Log log = LogFactory.getLog(GenericTypeValidator.class);
+ if (log.isDebugEnabled()) {
+ log.debug("Date parse failed value=[" + value + "], " +
"pattern=[" + datePattern + "], " +
"strict=[" + strict + "] " + e);
}
Modified: jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/util/ValidatorUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/util/ValidatorUtils.java?rev=384656&r1=384655&r2=384656&view=diff
==============================================================================
--- jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/util/ValidatorUtils.java (original)
+++ jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/util/ValidatorUtils.java Thu Mar 9 16:36:37 2006
@@ -44,8 +44,6 @@
*/
public class ValidatorUtils {
- private static final Log LOG = LogFactory.getLog(ValidatorUtils.class);
-
/**
* <p>Replace part of a <code>String</code> with another value.</p>
*
@@ -107,11 +105,14 @@
value = PropertyUtils.getProperty(bean, property);
} catch(IllegalAccessException e) {
- LOG.error(e.getMessage(), e);
+ Log log = LogFactory.getLog(ValidatorUtils.class);
+ log.error(e.getMessage(), e);
} catch(InvocationTargetException e) {
- LOG.error(e.getMessage(), e);
+ Log log = LogFactory.getLog(ValidatorUtils.class);
+ log.error(e.getMessage(), e);
} catch(NoSuchMethodException e) {
- LOG.error(e.getMessage(), e);
+ Log log = LogFactory.getLog(ValidatorUtils.class);
+ log.error(e.getMessage(), e);
}
if (value == null) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org