bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r997162 - in /incubator/bval/sandbox/lang3-work: ./ bval-core/ bval-core/src/main/java/org/apache/bval/ bval-jsr303/ bval-jsr303/src/main/java/ bval-jsr303/src/main/java/org/apache/bval/jsr303/ bval-jsr303/src/main/java/org/apache/bval/jsr3...
Date Wed, 15 Sep 2010 01:04:58 GMT
Author: mbenson
Date: Wed Sep 15 01:04:57 2010
New Revision: 997162

URL: http://svn.apache.org/viewvc?rev=997162&view=rev
Log:
merge r997154 slf4j

Modified:
    incubator/bval/sandbox/lang3-work/   (props changed)
    incubator/bval/sandbox/lang3-work/bval-core/pom.xml
    incubator/bval/sandbox/lang3-work/bval-core/src/main/java/org/apache/bval/MetaBeanBuilder.java
    incubator/bval/sandbox/lang3-work/bval-jsr303/pom.xml
    incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/   (props changed)
    incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/AnnotationConstraintBuilder.java
    incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConfigurationImpl.java
    incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintDefaults.java
    incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/DefaultMessageInterpolator.java
    incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/Jsr303MetaBeanFactory.java
    incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/resolver/DefaultTraversableResolver.java
    incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationIgnores.java
    incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/ValidationParser.java
    incubator/bval/sandbox/lang3-work/bval-tck/pom.xml
    incubator/bval/sandbox/lang3-work/bval-xstream/pom.xml
    incubator/bval/sandbox/lang3-work/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanFactory.java
    incubator/bval/sandbox/lang3-work/pom.xml

Propchange: incubator/bval/sandbox/lang3-work/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Sep 15 01:04:57 2010
@@ -1 +1 @@
-/incubator/bval/trunk:992143,992401,992406,992412,992510,992648,993404-993438,996236,996240
+/incubator/bval/trunk:992143,992401,992406,992412,992510,992648,993404-993438,996236,996240,997154

Modified: incubator/bval/sandbox/lang3-work/bval-core/pom.xml
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-core/pom.xml?rev=997162&r1=997161&r2=997162&view=diff
==============================================================================
--- incubator/bval/sandbox/lang3-work/bval-core/pom.xml (original)
+++ incubator/bval/sandbox/lang3-work/bval-core/pom.xml Wed Sep 15 01:04:57 2010
@@ -42,8 +42,8 @@
             <artifactId>commons-lang3</artifactId>
         </dependency>
         <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
         </dependency>
         <dependency>
             <groupId>commons-beanutils</groupId>
@@ -55,9 +55,9 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-            <scope>test</scope>
+            <groupId>org.slf4j</groupId>
+            <artifactId>jcl-over-slf4j</artifactId>
+            <scope>runtime</scope>
         </dependency>
     </dependencies>
 

Modified: incubator/bval/sandbox/lang3-work/bval-core/src/main/java/org/apache/bval/MetaBeanBuilder.java
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-core/src/main/java/org/apache/bval/MetaBeanBuilder.java?rev=997162&r1=997161&r2=997162&view=diff
==============================================================================
--- incubator/bval/sandbox/lang3-work/bval-core/src/main/java/org/apache/bval/MetaBeanBuilder.java
(original)
+++ incubator/bval/sandbox/lang3-work/bval-core/src/main/java/org/apache/bval/MetaBeanBuilder.java
Wed Sep 15 01:04:57 2010
@@ -18,8 +18,8 @@ package org.apache.bval;
 
 import org.apache.bval.model.MetaBean;
 import org.apache.commons.lang3.ClassUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -29,7 +29,7 @@ import java.util.Map;
  * factories<br/>
  */
 public class MetaBeanBuilder {
-    private static final Log log = LogFactory.getLog(MetaBeanBuilder.class);
+    private static final Logger log = LoggerFactory.getLogger(MetaBeanBuilder.class);
 
     /**
      * here you can install different kinds of factories to create MetaBeans

Modified: incubator/bval/sandbox/lang3-work/bval-jsr303/pom.xml
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303/pom.xml?rev=997162&r1=997161&r2=997162&view=diff
==============================================================================
--- incubator/bval/sandbox/lang3-work/bval-jsr303/pom.xml (original)
+++ incubator/bval/sandbox/lang3-work/bval-jsr303/pom.xml Wed Sep 15 01:04:57 2010
@@ -101,8 +101,8 @@
             <version>${project.version}</version>
         </dependency>
         <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.commons</groupId>
@@ -118,11 +118,6 @@
             <artifactId>mockito-core</artifactId>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-            <scope>test</scope>
-        </dependency>
 
         <!-- optional dependencies -->
         <dependency>

Propchange: incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Sep 15 01:04:57 2010
@@ -1 +1 @@
-/incubator/bval/trunk/bval-jsr303/src/main/java:992330-992353,992401,992406,992412,992510,992648,993404-993438,996236,996240
+/incubator/bval/trunk/bval-jsr303/src/main/java:992330-992353,992401,992406,992412,992510,992648,993404-993438,996236,996240,997154

Modified: incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/AnnotationConstraintBuilder.java
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/AnnotationConstraintBuilder.java?rev=997162&r1=997161&r2=997162&view=diff
==============================================================================
--- incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/AnnotationConstraintBuilder.java
(original)
+++ incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/AnnotationConstraintBuilder.java
Wed Sep 15 01:04:57 2010
@@ -41,8 +41,8 @@ import org.apache.bval.jsr303.groups.Gro
 import org.apache.bval.jsr303.util.SecureActions;
 import org.apache.bval.jsr303.xml.AnnotationProxyBuilder;
 import org.apache.bval.util.AccessStrategy;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Description: helper class that builds a {@link ConstraintValidation} or its
@@ -50,7 +50,7 @@ import org.apache.commons.logging.LogFac
  * providing information (e.g. for @OverridesAttributes) <br/>
  */
 final class AnnotationConstraintBuilder<A extends Annotation> {
-    private static final Log log = LogFactory.getLog(AnnotationConstraintBuilder.class);
+    private static final Logger log = LoggerFactory.getLogger(AnnotationConstraintBuilder.class);
 
     private final ConstraintValidation<?> constraintValidation;
     private List<ConstraintOverrides> overrides;

Modified: incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConfigurationImpl.java
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConfigurationImpl.java?rev=997162&r1=997161&r2=997162&view=diff
==============================================================================
--- incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConfigurationImpl.java
(original)
+++ incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConfigurationImpl.java
Wed Sep 15 01:04:57 2010
@@ -21,8 +21,8 @@ package org.apache.bval.jsr303;
 
 import org.apache.bval.jsr303.resolver.DefaultTraversableResolver;
 import org.apache.bval.jsr303.xml.ValidationParser;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.validation.ConstraintValidatorFactory;
 import javax.validation.MessageInterpolator;
@@ -47,7 +47,7 @@ import java.util.Set;
  * <br/>
  */
 public class ConfigurationImpl implements ApacheValidatorConfiguration, ConfigurationState
{
-    private static final Log log = LogFactory.getLog(ConfigurationImpl.class);
+    private static final Logger log = LoggerFactory.getLogger(ConfigurationImpl.class);
 
     /**
      * Configured {@link ValidationProvider}

Modified: incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintDefaults.java
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintDefaults.java?rev=997162&r1=997161&r2=997162&view=diff
==============================================================================
--- incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintDefaults.java
(original)
+++ incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintDefaults.java
Wed Sep 15 01:04:57 2010
@@ -19,8 +19,8 @@
 package org.apache.bval.jsr303;
 
 import org.apache.bval.jsr303.util.SecureActions;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.validation.ConstraintValidator;
 import java.io.IOException;
@@ -34,7 +34,7 @@ import java.util.*;
  * These are configured in DefaultConstraints.properties.<br/>
  */
 public class ConstraintDefaults {
-    private static final Log log = LogFactory.getLog(ConstraintDefaults.class);
+    private static final Logger log = LoggerFactory.getLogger(ConstraintDefaults.class);
     private static final String DEFAULT_CONSTRAINTS =
           "org/apache/bval/jsr303/DefaultConstraints.properties";
     
@@ -81,7 +81,7 @@ public class ConstraintDefaults {
                 log.error("cannot load " + resource, e);
             }
         } else {
-            log.warn("cannot find " + resource);
+            log.warn("cannot find {}", resource);
         }
         Map<String, Class<? extends ConstraintValidator<?, ?>>[]> loadedConstraints
                 = new HashMap<String, Class<? extends ConstraintValidator<?,?>>[]>();

Modified: incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/DefaultMessageInterpolator.java
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/DefaultMessageInterpolator.java?rev=997162&r1=997161&r2=997162&view=diff
==============================================================================
--- incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/DefaultMessageInterpolator.java
(original)
+++ incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/DefaultMessageInterpolator.java
Wed Sep 15 01:04:57 2010
@@ -17,8 +17,8 @@
 package org.apache.bval.jsr303;
 
 import org.apache.commons.lang3.ArrayUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.validation.MessageInterpolator;
 import java.util.Locale;
@@ -36,7 +36,7 @@ import java.util.regex.Pattern;
  * This class is threadsafe.<br/>
  */
 public class DefaultMessageInterpolator implements MessageInterpolator {
-    private static final Log log = LogFactory.getLog(DefaultMessageInterpolator.class);
+    private static final Logger log = LoggerFactory.getLogger(DefaultMessageInterpolator.class);
     private static final String DEFAULT_VALIDATION_MESSAGES =
           "org.apache.bval.jsr303.ValidationMessages";
     private static final String USER_VALIDATION_MESSAGES = "ValidationMessages";
@@ -169,13 +169,10 @@ public class DefaultMessageInterpolator 
             rb = loadBundle(this.getClass().getClassLoader(), locale,
                   USER_VALIDATION_MESSAGES + " not found by validator classloader");
         }
-        if (log.isDebugEnabled()) {
-            if (rb != null) {
-                log.debug(USER_VALIDATION_MESSAGES + " found");
-            } else {
-                log.debug(USER_VALIDATION_MESSAGES + " not found. Delegating to " +
-                      DEFAULT_VALIDATION_MESSAGES);
-            }
+        if (rb != null) {
+            log.debug("{} found", USER_VALIDATION_MESSAGES);
+        } else {
+            log.debug("{} not found. Delegating to {}", USER_VALIDATION_MESSAGES, DEFAULT_VALIDATION_MESSAGES);
         }
         return rb;
     }

Modified: incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/Jsr303MetaBeanFactory.java
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/Jsr303MetaBeanFactory.java?rev=997162&r1=997161&r2=997162&view=diff
==============================================================================
--- incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/Jsr303MetaBeanFactory.java
(original)
+++ incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/Jsr303MetaBeanFactory.java
Wed Sep 15 01:04:57 2010
@@ -42,8 +42,8 @@ import org.apache.bval.model.MetaPropert
 import org.apache.bval.util.AccessStrategy;
 import org.apache.bval.util.FieldAccess;
 import org.apache.bval.util.MethodAccess;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Description: process the class annotations for JSR303 constraint validations
@@ -53,7 +53,7 @@ import org.apache.commons.logging.LogFac
 public class Jsr303MetaBeanFactory implements MetaBeanFactory {
     /** Shared log instance */
     // of dubious utility as it's static :/
-    protected static final Log log = LogFactory.getLog(Jsr303MetaBeanFactory.class);
+    protected static final Logger log = LoggerFactory.getLogger(Jsr303MetaBeanFactory.class);
 
     /** Constant for the "value" annotation attribute specified in JSR303 */
     protected static final String ANNOTATION_VALUE = "value";
@@ -273,9 +273,7 @@ public class Jsr303MetaBeanFactory imple
         if (!containsDefault) {
             throw new GroupDefinitionException("Redefined default group sequence must contain
" + beanClass.getName());
         }
-        if (log.isDebugEnabled()) {
-            log.debug("Default group sequence for bean " + beanClass.getName() + " is: "
+ groupSeq);
-        }
+        log.debug("Default group sequence for bean {} is: {}", beanClass.getName(), groupSeq);
     }
 
     private static MetaProperty addMetaProperty(MetaBean parentMetaBean, String propName,
Type type) {

Modified: incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/resolver/DefaultTraversableResolver.java
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/resolver/DefaultTraversableResolver.java?rev=997162&r1=997161&r2=997162&view=diff
==============================================================================
--- incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/resolver/DefaultTraversableResolver.java
(original)
+++ incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/resolver/DefaultTraversableResolver.java
Wed Sep 15 01:04:57 2010
@@ -18,8 +18,8 @@ package org.apache.bval.jsr303.resolver;
 
 import org.apache.bval.jsr303.util.SecureActions;
 import org.apache.commons.lang3.ClassUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.validation.Path;
 import javax.validation.TraversableResolver;
@@ -28,7 +28,7 @@ import java.lang.annotation.ElementType;
 
 /** @see javax.validation.TraversableResolver */
 public class DefaultTraversableResolver implements TraversableResolver, CachingRelevant {
-    private static final Log log = LogFactory.getLog(DefaultTraversableResolver.class);
+    private static final Logger log = LoggerFactory.getLogger(DefaultTraversableResolver.class);
 
     /** Class to load to check whether JPA 2 is on the classpath. */
     private static final String PERSISTENCE_UTIL_CLASSNAME =
@@ -73,12 +73,9 @@ public class DefaultTraversableResolver 
     private void initJpa() {
         try {
             ClassUtils.getClass(PERSISTENCE_UTIL_CLASSNAME);
-            if (log.isDebugEnabled())
-                log.debug("Found " + PERSISTENCE_UTIL_CLASSNAME + " on classpath.");
+            log.debug("Found {} on classpath.", PERSISTENCE_UTIL_CLASSNAME);
         } catch (Exception e) {
-            if (log.isDebugEnabled())
-                log.debug("Cannot find " + PERSISTENCE_UTIL_CLASSNAME +
-                  " on classpath. All properties will per default be traversable.");
+            log.debug("Cannot find {} on classpath. All properties will per default be traversable.",
PERSISTENCE_UTIL_CLASSNAME);
             return;
         }
 
@@ -87,9 +84,7 @@ public class DefaultTraversableResolver 
                   (Class<? extends TraversableResolver>) ClassUtils
                         .getClass(JPA_AWARE_TRAVERSABLE_RESOLVER_CLASSNAME);
             jpaTR = SecureActions.newInstance(jpaAwareResolverClass);
-            if (log.isDebugEnabled())
-                log.debug("Instantiated an instance of " +
-                    JPA_AWARE_TRAVERSABLE_RESOLVER_CLASSNAME + ".");
+            log.debug("Instantiated an instance of {}.", JPA_AWARE_TRAVERSABLE_RESOLVER_CLASSNAME);
         } catch (Exception e) {
             log.warn("Unable to load or instanciate JPA aware resolver " +
                   JPA_AWARE_TRAVERSABLE_RESOLVER_CLASSNAME +

Modified: incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationIgnores.java
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationIgnores.java?rev=997162&r1=997161&r2=997162&view=diff
==============================================================================
--- incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationIgnores.java
(original)
+++ incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationIgnores.java
Wed Sep 15 01:04:57 2010
@@ -18,8 +18,8 @@
  */
 package org.apache.bval.jsr303.xml;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.lang.reflect.Field;
 import java.lang.reflect.Member;
@@ -34,7 +34,7 @@ import java.util.Map;
  */
 public final class AnnotationIgnores {
 
-    private static final Log log = LogFactory.getLog(AnnotationIgnores.class);
+    private static final Logger log = LoggerFactory.getLogger(AnnotationIgnores.class);
 
     /**
      * Keeps track whether the 'ignore-annotations' flag is set on bean level in the
@@ -118,8 +118,7 @@ public final class AnnotationIgnores {
         } else {
             type = "Property";
         }
-        log.debug(type + " level annotations are getting ignored for " + clazz.getName()
+
-              "." + member.getName());
+        log.debug("{} level annotations are getting ignored for {}.{}", new Object[]{type,
clazz.getName(), member.getName()});
     }
 
     /**
@@ -143,8 +142,8 @@ public final class AnnotationIgnores {
         } else {
             ignoreAnnotation = getDefaultIgnoreAnnotation(clazz);
         }
-        if (log.isDebugEnabled() && ignoreAnnotation) {
-            log.debug("Class level annotation are getting ignored for " + clazz.getName());
+        if (ignoreAnnotation) {
+            log.debug("Class level annotation are getting ignored for {}", clazz.getName());
         }
         return ignoreAnnotation;
     }

Modified: incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/ValidationParser.java
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/ValidationParser.java?rev=997162&r1=997161&r2=997162&view=diff
==============================================================================
--- incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/ValidationParser.java
(original)
+++ incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/ValidationParser.java
Wed Sep 15 01:04:57 2010
@@ -42,8 +42,8 @@ import org.apache.bval.jsr303.Configurat
 import org.apache.bval.jsr303.util.IOUtils;
 import org.apache.bval.jsr303.util.SecureActions;
 import org.apache.bval.util.PrivilegedActions;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.xml.sax.SAXException;
 
 /**
@@ -54,7 +54,7 @@ public class ValidationParser {
     private static final String DEFAULT_VALIDATION_XML_FILE = "META-INF/validation.xml";
     private static final String VALIDATION_CONFIGURATION_XSD =
           "META-INF/validation-configuration-1.0.xsd";
-    private static final Log log = LogFactory.getLog(ValidationParser.class);
+    private static final Logger log = LoggerFactory.getLogger(ValidationParser.class);
     private final String validationXmlFile;
 
     /**
@@ -85,12 +85,11 @@ public class ValidationParser {
         try {
             inputStream = getInputStream(validationXmlFile);
             if (inputStream == null) {
-                if (log.isDebugEnabled()) log.debug("No " + validationXmlFile +
-                      " found. Using annotation based configuration only.");
+                log.debug("No {} found. Using annotation based configuration only.", validationXmlFile);
                 return null;
             }
 
-            if (log.isDebugEnabled()) log.debug(validationXmlFile + " found.");
+            log.debug("{} found.", validationXmlFile);
 
             Schema schema = getSchema();
             JAXBContext jc = JAXBContext.newInstance(ValidationConfigType.class);
@@ -175,8 +174,7 @@ public class ValidationParser {
                   (Class<? extends ValidationProvider<?>>) SecureActions
                         .loadClass(providerClassName, this.getClass());
             target.setProviderClass(clazz);
-            if (log.isInfoEnabled())
-                log.info("Using " + providerClassName + " as validation provider.");
+            log.info("Using {} as validation provider.", providerClassName);
         }
     }
 
@@ -189,9 +187,7 @@ public class ValidationParser {
                 Class<MessageInterpolator> clazz = (Class<MessageInterpolator>)
SecureActions
                       .loadClass(messageInterpolatorClass, this.getClass());
                 target.messageInterpolator(SecureActions.newInstance(clazz));
-                if (log.isInfoEnabled())
-                    log.info("Using " + messageInterpolatorClass + " as message interpolator.");
-    
+                log.info("Using {} as message interpolator.", messageInterpolatorClass);
             }
         }
     }
@@ -205,8 +201,7 @@ public class ValidationParser {
                 Class<TraversableResolver> clazz = (Class<TraversableResolver>)
SecureActions
                       .loadClass(traversableResolverClass, this.getClass());
                 target.traversableResolver(SecureActions.newInstance(clazz));
-                if (log.isInfoEnabled())
-                    log.info("Using " + traversableResolverClass + " as traversable resolver.");
+                log.info("Using {} as traversable resolver.", traversableResolverClass);
             }
         }
     }
@@ -221,8 +216,7 @@ public class ValidationParser {
                       (Class<ConstraintValidatorFactory>) SecureActions
                             .loadClass(constraintFactoryClass, this.getClass());
                 target.constraintValidatorFactory(SecureActions.newInstance(clazz));
-                if (log.isInfoEnabled())
-                    log.info("Using " + constraintFactoryClass + " as constraint factory.");
+                log.info("Using {} as constraint factory.", constraintFactoryClass);
             }
         }
     }
@@ -235,10 +229,7 @@ public class ValidationParser {
                 // Classloader needs a path without a starting /
                 mappingFileName = mappingFileName.substring(1);
             }
-            if (log.isDebugEnabled()) {
-                log.debug(
-                      "Trying to open input stream for " + mappingFileName);
-            }
+            log.debug("Trying to open input stream for {}", mappingFileName);
             InputStream in = null;
             try {
                 in = getInputStream(mappingFileName);

Modified: incubator/bval/sandbox/lang3-work/bval-tck/pom.xml
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-tck/pom.xml?rev=997162&r1=997161&r2=997162&view=diff
==============================================================================
--- incubator/bval/sandbox/lang3-work/bval-tck/pom.xml (original)
+++ incubator/bval/sandbox/lang3-work/bval-tck/pom.xml Wed Sep 15 01:04:57 2010
@@ -80,7 +80,7 @@
                 <dependency>
                     <groupId>org.slf4j</groupId>
                     <artifactId>slf4j-log4j12</artifactId>
-                    <version>1.5.6</version>
+                    <version>1.6.1</version>
                     <scope>runtime</scope>
                 </dependency>
                 <dependency>
@@ -168,12 +168,6 @@
                                             <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
                                         </artifactItem>
                                         <artifactItem>
-                                            <groupId>commons-logging</groupId>
-                                            <artifactId>commons-logging</artifactId>
-                                            <overWrite>true</overWrite>
-                                            <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
-                                        </artifactItem>
-                                        <artifactItem>
                                             <groupId>commons-beanutils</groupId>
                                             <artifactId>commons-beanutils-core</artifactId>
                                             <overWrite>true</overWrite>
@@ -187,6 +181,18 @@
                                         </artifactItem>
                                         <artifactItem>
                                             <groupId>org.slf4j</groupId>
+                                            <artifactId>slf4j-api</artifactId>
+                                            <overWrite>true</overWrite>
+                                            <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
+                                        </artifactItem>
+                                        <artifactItem>
+                                            <groupId>org.slf4j</groupId>
+                                            <artifactId>jcl-over-slf4j</artifactId>
+                                            <overWrite>true</overWrite>
+                                            <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
+                                        </artifactItem>
+                                        <artifactItem>
+                                            <groupId>org.slf4j</groupId>
                                             <artifactId>slf4j-log4j12</artifactId>
                                             <overWrite>true</overWrite>
                                             <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>

Modified: incubator/bval/sandbox/lang3-work/bval-xstream/pom.xml
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-xstream/pom.xml?rev=997162&r1=997161&r2=997162&view=diff
==============================================================================
--- incubator/bval/sandbox/lang3-work/bval-xstream/pom.xml (original)
+++ incubator/bval/sandbox/lang3-work/bval-xstream/pom.xml Wed Sep 15 01:04:57 2010
@@ -51,11 +51,6 @@
       <artifactId>junit</artifactId>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-      <scope>test</scope>
-    </dependency>
   </dependencies>
 
   <build>

Modified: incubator/bval/sandbox/lang3-work/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanFactory.java
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanFactory.java?rev=997162&r1=997161&r2=997162&view=diff
==============================================================================
--- incubator/bval/sandbox/lang3-work/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanFactory.java
(original)
+++ incubator/bval/sandbox/lang3-work/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanFactory.java
Wed Sep 15 01:04:57 2010
@@ -21,8 +21,8 @@ import org.apache.bval.model.FeaturesCap
 import org.apache.bval.model.MetaBean;
 import org.apache.bval.model.MetaProperty;
 import org.apache.bval.routines.StandardValidation;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.IOException;
 import java.util.*;
@@ -33,7 +33,7 @@ import static org.apache.bval.model.Feat
  * Description: Create or enrich MetaBeans from apache beanInfos xml<br/>
  */
 public class XMLMetaBeanFactory implements MetaBeanFactory {
-    private static final Log log = LogFactory.getLog(XMLMetaBeanFactory.class);
+    private static final Logger log = LoggerFactory.getLogger(XMLMetaBeanFactory.class);
 
     // use LinkedHashMap to keep sequence of loaders
     private final Map<XMLMetaBeanLoader, XMLMetaBeanInfos> resources =

Modified: incubator/bval/sandbox/lang3-work/pom.xml
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/pom.xml?rev=997162&r1=997161&r2=997162&view=diff
==============================================================================
--- incubator/bval/sandbox/lang3-work/pom.xml (original)
+++ incubator/bval/sandbox/lang3-work/pom.xml Wed Sep 15 01:04:57 2010
@@ -308,19 +308,30 @@
                 <version>3.0-SNAPSHOT</version>
             </dependency>
             <dependency>
-                <groupId>commons-logging</groupId>
-                <artifactId>commons-logging</artifactId>
-                <version>1.1.1</version>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-api</artifactId>
+                <version>1.6.1</version>
             </dependency>
             <dependency>
-                <groupId>log4j</groupId>
-                <artifactId>log4j</artifactId>
-                <version>1.2.14</version>
+                <groupId>org.slf4j</groupId>
+                <artifactId>jcl-over-slf4j</artifactId>
+                <version>1.6.1</version>
+            </dependency>
+            <dependency>
+                <groupId>commons-lang</groupId>
+                <artifactId>commons-lang</artifactId>
+                <version>2.4</version>
             </dependency>
             <dependency>
                 <groupId>commons-beanutils</groupId>
                 <artifactId>commons-beanutils-core</artifactId>
                 <version>1.8.3</version>
+                <exclusions>
+                    <exclusion>
+                        <groupId>commons-logging</groupId>
+                        <artifactId>commons-logging</artifactId>
+                    </exclusion>
+                </exclusions>
             </dependency>
             <dependency>
                 <groupId>com.thoughtworks.xstream</groupId>



Mime
View raw message