bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1514750 [2/2] - in /bval/branches/bval-11: bval-core/src/main/java/org/apache/bval/ bval-core/src/main/java/org/apache/bval/model/ bval-core/src/main/java/org/apache/bval/util/ bval-extras/src/main/java/org/apache/bval/extras/constraints/c...
Date Fri, 16 Aug 2013 15:35:11 GMT
Modified: bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/AnnotationProcessor.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/AnnotationProcessor.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/AnnotationProcessor.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/AnnotationProcessor.java Fri Aug 16 15:35:08 2013
@@ -18,39 +18,25 @@
  */
 package org.apache.bval.jsr303;
 
-import org.apache.bval.jsr303.util.ConstraintDefinitionValidator;
 import org.apache.bval.model.Features;
 import org.apache.bval.model.Meta;
 import org.apache.bval.model.MetaBean;
 import org.apache.bval.util.AccessStrategy;
 import org.apache.bval.util.reflection.Reflection;
 import org.apache.commons.lang3.ArrayUtils;
-import org.apache.commons.lang3.ClassUtils;
-import org.apache.commons.lang3.reflect.TypeUtils;
 
 import javax.validation.Constraint;
-import javax.validation.ConstraintDefinitionException;
 import javax.validation.ConstraintValidator;
-import javax.validation.UnexpectedTypeException;
 import javax.validation.Valid;
-import javax.validation.ValidationException;
 import javax.validation.constraintvalidation.SupportedValidationTarget;
 import javax.validation.constraintvalidation.ValidationTarget;
 import javax.validation.groups.ConvertGroup;
 import javax.validation.groups.Default;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.AnnotatedElement;
-import java.lang.reflect.Array;
-import java.lang.reflect.GenericArrayType;
 import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Type;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
 import java.util.Set;
 
 /**
@@ -146,7 +132,6 @@ public final class AnnotationProcessor {
          */
         Constraint vcAnno = annotation.annotationType().getAnnotation(Constraint.class);
         if (vcAnno != null) {
-            ConstraintDefinitionValidator.validateConstraintDefinition(annotation);
             Class<? extends ConstraintValidator<A, ?>>[] validatorClasses;
             validatorClasses = findConstraintValidatorClasses(annotation, vcAnno);
             return applyConstraint(annotation, validatorClasses, prop, owner, access, appender);

Modified: bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/ApacheValidationProvider.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/ApacheValidationProvider.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/ApacheValidationProvider.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/ApacheValidationProvider.java Fri Aug 16 15:35:08 2013
@@ -18,8 +18,7 @@
  */
 package org.apache.bval.jsr303;
 
-import java.security.AccessController;
-import java.security.PrivilegedAction;
+import org.apache.commons.lang3.ClassUtils;
 
 import javax.validation.Configuration;
 import javax.validation.ValidationException;
@@ -27,8 +26,8 @@ import javax.validation.ValidatorFactory
 import javax.validation.spi.BootstrapState;
 import javax.validation.spi.ConfigurationState;
 import javax.validation.spi.ValidationProvider;
-
-import org.apache.commons.lang3.ClassUtils;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 
 /**
  * Description: Implementation of {@link ValidationProvider} for jsr303

Modified: bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/CascadingPropertyValidator.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/CascadingPropertyValidator.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/CascadingPropertyValidator.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/CascadingPropertyValidator.java Fri Aug 16 15:35:08 2013
@@ -16,11 +16,10 @@
  */
 package org.apache.bval.jsr303;
 
-import java.util.Set;
-
 import javax.validation.ConstraintViolation;
 import javax.validation.Valid;
 import javax.validation.Validator;
+import java.util.Set;
 
 /**
  * Per the bean validation spec, {@link Valid} is not honored by the

Modified: bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintAnnotationAttributes.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintAnnotationAttributes.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintAnnotationAttributes.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintAnnotationAttributes.java Fri Aug 16 15:35:08 2013
@@ -20,11 +20,9 @@ import org.apache.bval.util.reflection.R
 import org.apache.commons.lang3.reflect.TypeUtils;
 
 import javax.validation.Constraint;
-import javax.validation.ConstraintDefinitionException;
 import javax.validation.ConstraintTarget;
 import javax.validation.Payload;
 import java.lang.annotation.Annotation;
-import java.lang.reflect.Array;
 import java.lang.reflect.Method;
 import java.lang.reflect.Type;
 import java.security.AccessController;
@@ -134,10 +132,19 @@ public enum ConstraintAnnotationAttribut
     }
 
     public <C extends Annotation> Worker<C> analyze(final Class<C> clazz) {
+        if (clazz.getName().startsWith("javax.validation.constraint.")) { // cache only APIs classes to avoid memory leaks
+            Worker<C> w = Worker.class.cast(WORKER_CACHE.get(clazz));
+            if (w == null) {
+                w = new Worker<C>(clazz);
+                WORKER_CACHE.putIfAbsent(clazz, w);
+                return w;
+            }
+        }
         return new Worker<C>(clazz);
     }
 
     // this is static but related to Worker
+    private static final ConcurrentMap<Class<?>, Worker<?>> WORKER_CACHE = new ConcurrentHashMap<Class<?>, Worker<?>>();
     private static final ConcurrentMap<Class<?>, ConcurrentMap<String, Method>> METHOD_BY_NAME_AND_CLASS = new ConcurrentHashMap<Class<?>, ConcurrentMap<String, Method>>();
     private static final Method NULL_METHOD;
     static {
@@ -150,36 +157,13 @@ public enum ConstraintAnnotationAttribut
     public class Worker<C extends Annotation> {
 
         public final Method method;
-        public final Object defaultValue;
-        private RuntimeException error;
 
         /**
          * Create a new Worker instance.
          * @param constraintType to handle
          */
         Worker(final Class<C> constraintType) {
-            Object _defaultValue = null;
-            try {
-                method = findMethod(constraintType, attributeName);
-                if (method == null || method == NULL_METHOD) {
-                    error = new ConstraintDefinitionException("Annotation " + constraintType + " has no " + attributeName + " method");
-                    return;
-                }
-
-                 if (!TypeUtils.isAssignable(method.getReturnType(), type)) {
-                    error = new ConstraintDefinitionException("Return type for " + attributeName + "() must be of type " + type);
-                    return;
-                }
-                _defaultValue = method.getDefaultValue();
-                if (_defaultValue == null && permitNullDefaultValue) {
-                    return;
-                }
-                if (TypeUtils.isArrayType(type) && Array.getLength(_defaultValue) > 0) {
-                    error = new ConstraintDefinitionException("Default value for " + attributeName + "() must be an empty array");
-                }
-            } finally {
-                defaultValue = _defaultValue;
-            }
+            method = findMethod(constraintType, attributeName);
         }
 
         private Method findMethod(final Class<C> constraintType, final String attributeName) {
@@ -205,18 +189,14 @@ public enum ConstraintAnnotationAttribut
             if (oldMtd != null) {
                 return oldMtd;
             }
+            if (!m.isAccessible()) {
+                m.setAccessible(true);
+            }
             return m;
         }
 
         public boolean isValid() {
-            return error == null;
-        }
-
-        public Worker<C> valid() {
-            if (!isValid()) {
-                throw error;
-            }
-            return this;
+            return method != null && method != NULL_METHOD;
         }
 
         public Object read(final Annotation constraint) {
@@ -232,7 +212,6 @@ public enum ConstraintAnnotationAttribut
 
         private Object doInvoke(final Annotation constraint) {
             try {
-                method.setAccessible(true);
                 return method.invoke(constraint);
             } catch (Exception e) {
                 throw new RuntimeException(e);

Modified: bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintFinderImpl.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintFinderImpl.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintFinderImpl.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintFinderImpl.java Fri Aug 16 15:35:08 2013
@@ -28,7 +28,12 @@ import javax.validation.metadata.Element
 import javax.validation.metadata.ElementDescriptor.ConstraintFinder;
 import javax.validation.metadata.Scope;
 import java.lang.annotation.ElementType;
-import java.util.*;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
 
 /**
  * Description: Implementation of the fluent {@link ConstraintFinder} interface.<br/>

Modified: bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintValidatorContextImpl.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintValidatorContextImpl.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintValidatorContextImpl.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintValidatorContextImpl.java Fri Aug 16 15:35:08 2013
@@ -28,7 +28,6 @@ import org.apache.bval.model.ValidationL
 import javax.validation.ConstraintValidator;
 import javax.validation.ConstraintValidatorContext;
 import javax.validation.ElementKind;
-import javax.validation.ParameterNameProvider;
 import javax.validation.Path;
 import javax.validation.ValidationException;
 import java.lang.reflect.Method;

Modified: bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/ElementDescriptorImpl.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/ElementDescriptorImpl.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/ElementDescriptorImpl.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/ElementDescriptorImpl.java Fri Aug 16 15:35:08 2013
@@ -30,7 +30,6 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
-import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.CopyOnWriteArraySet;
 
 /**

Modified: bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/Jsr303MetaBeanFactory.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/Jsr303MetaBeanFactory.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/Jsr303MetaBeanFactory.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/Jsr303MetaBeanFactory.java Fri Aug 16 15:35:08 2013
@@ -33,7 +33,6 @@ import org.apache.bval.util.FieldAccess;
 import org.apache.bval.util.MethodAccess;
 import org.apache.bval.util.reflection.Reflection;
 
-import javax.validation.Constraint;
 import javax.validation.ConstraintDeclarationException;
 import javax.validation.GroupDefinitionException;
 import javax.validation.GroupSequence;
@@ -188,43 +187,6 @@ public class Jsr303MetaBeanFactory imple
     }
 
     /**
-     * Learn whether a given Method has validation constraints defined via JSR303 annotations.
-     * 
-     * @param method
-     * @return <code>true</code> if constraints detected
-     */
-    protected boolean hasValidationConstraintsDefined(Method method) {
-        for (Annotation annot : method.getDeclaredAnnotations()) {
-            if (hasValidationConstraintsDefined(annot)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    private boolean hasValidationConstraintsDefined(final Annotation annot) {
-        // If it is annotated with @Constraint
-        if (annot.annotationType().getAnnotation(Constraint.class) != null) {
-            return true;
-        }
-
-        // Check whether it is a multivalued constraint:
-        final ConstraintAnnotationAttributes.Worker<?> worker = ConstraintAnnotationAttributes.VALUE.analyze(annot.annotationType());
-        if (worker.isValid()) {
-            Annotation[] children = Annotation[].class.cast(worker.read(annot));
-            if (children != null) {
-                for (final Annotation child : children) {
-                    if (hasValidationConstraintsDefined(child)) {
-                        return true;
-                    }
-                }
-            }
-        }
-
-        return false;
-    }
-
-    /**
      * Add cascade validation and constraints from xml mappings
      * 
      * @param beanClass

Modified: bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/NodeContextBuilderImpl.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/NodeContextBuilderImpl.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/NodeContextBuilderImpl.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/NodeContextBuilderImpl.java Fri Aug 16 15:35:08 2013
@@ -25,8 +25,6 @@ import org.apache.bval.jsr303.util.PathI
 
 import javax.validation.ConstraintValidatorContext;
 import javax.validation.ElementKind;
-import javax.validation.Path;
-import java.util.Iterator;
 
 public class NodeContextBuilderImpl implements ConstraintValidatorContext.ConstraintViolationBuilder.NodeContextBuilder {
     private final PathImpl path;

Modified: bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/PropertyDescriptorImpl.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/PropertyDescriptorImpl.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/PropertyDescriptorImpl.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/PropertyDescriptorImpl.java Fri Aug 16 15:35:08 2013
@@ -21,9 +21,7 @@ package org.apache.bval.jsr303;
 import org.apache.bval.model.Features;
 import org.apache.bval.model.MetaProperty;
 
-import javax.validation.metadata.GroupConversionDescriptor;
 import javax.validation.metadata.PropertyDescriptor;
-import java.util.Set;
 
 /**
  * Description: {@link PropertyDescriptor} implementation.<br/>

Modified: bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/groups/Group.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/groups/Group.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/groups/Group.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/groups/Group.java Fri Aug 16 15:35:08 2013
@@ -18,10 +18,10 @@
  */
 package org.apache.bval.jsr303.groups;
 
-import javax.validation.groups.Default;
-
 import org.apache.commons.lang3.ObjectUtils;
 
+import javax.validation.groups.Default;
+
 /**
  * Immutable object that wraps an interface representing a single group.
  */

Modified: bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/groups/GroupsComputer.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/groups/GroupsComputer.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/groups/GroupsComputer.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/groups/GroupsComputer.java Fri Aug 16 15:35:08 2013
@@ -23,7 +23,13 @@ import javax.validation.GroupDefinitionE
 import javax.validation.GroupSequence;
 import javax.validation.ValidationException;
 import javax.validation.groups.Default;
-import java.util.*;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 
 /**

Modified: bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/NodeBuilderDefinedContextImpl.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/NodeBuilderDefinedContextImpl.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/NodeBuilderDefinedContextImpl.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/NodeBuilderDefinedContextImpl.java Fri Aug 16 15:35:08 2013
@@ -23,7 +23,6 @@ import org.apache.bval.jsr303.Constraint
 
 import javax.validation.ConstraintValidatorContext;
 import javax.validation.ElementKind;
-import javax.validation.Path;
 
 /**
  * Description: Implementation of {@link NodeBuilderDefinedContext}.<br/>

Modified: bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/NodeContextBuilderImpl.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/NodeContextBuilderImpl.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/NodeContextBuilderImpl.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/NodeContextBuilderImpl.java Fri Aug 16 15:35:08 2013
@@ -23,7 +23,6 @@ import org.apache.bval.jsr303.Constraint
 
 import javax.validation.ConstraintValidatorContext;
 import javax.validation.ConstraintValidatorContext.ConstraintViolationBuilder.NodeContextBuilder;
-import javax.validation.ElementKind;
 
 /**
  * Description: Implementation of {@link NodeContextBuilder}.<br/>

Modified: bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/PathNavigation.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/PathNavigation.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/PathNavigation.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/PathNavigation.java Fri Aug 16 15:35:08 2013
@@ -16,12 +16,11 @@
  */
 package org.apache.bval.jsr303.util;
 
-import java.io.StringWriter;
-import java.text.ParsePosition;
+import org.apache.commons.lang3.StringEscapeUtils;
 
 import javax.validation.ValidationException;
-
-import org.apache.commons.lang3.StringEscapeUtils;
+import java.io.StringWriter;
+import java.text.ParsePosition;
 
 /**
  * Defines a path navigation algorithm and a means of interacting with same.

Modified: bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/ValidationContextTraversal.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/ValidationContextTraversal.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/ValidationContextTraversal.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/ValidationContextTraversal.java Fri Aug 16 15:35:08 2013
@@ -16,8 +16,6 @@
  */
 package org.apache.bval.jsr303.util;
 
-import java.lang.reflect.Type;
-
 import org.apache.bval.DynamicMetaBean;
 import org.apache.bval.jsr303.Jsr303MetaBeanFactory;
 import org.apache.bval.jsr303.UnknownPropertyException;
@@ -32,6 +30,8 @@ import org.apache.bval.util.PropertyAcce
 import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.reflect.TypeUtils;
 
+import java.lang.reflect.Type;
+
 /**
  * {@link ValidationContext} traversal {@link CallbackProcedure}.
  * 

Modified: bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/MetaConstraint.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/MetaConstraint.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/MetaConstraint.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/MetaConstraint.java Fri Aug 16 15:35:08 2013
@@ -22,7 +22,6 @@ import org.apache.bval.util.AccessStrate
 import org.apache.bval.util.FieldAccess;
 import org.apache.bval.util.MethodAccess;
 
-import javax.validation.ValidationException;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;

Modified: bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/constraints/AuthorAddressKnown.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/constraints/AuthorAddressKnown.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/constraints/AuthorAddressKnown.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/constraints/AuthorAddressKnown.java Fri Aug 16 15:35:08 2013
@@ -16,21 +16,20 @@
  */
 package org.apache.bval.constraints;
 
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
+import org.apache.bval.jsr303.example.Address;
+import org.apache.bval.jsr303.example.Author;
 
 import javax.validation.Constraint;
 import javax.validation.ConstraintValidator;
 import javax.validation.ConstraintValidatorContext;
 import javax.validation.Payload;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
 
-import org.apache.bval.jsr303.example.Address;
-import org.apache.bval.jsr303.example.Author;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 /**
  * 

Modified: bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/constraints/CompanyEmail.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/constraints/CompanyEmail.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/constraints/CompanyEmail.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/constraints/CompanyEmail.java Fri Aug 16 15:35:08 2013
@@ -26,7 +26,11 @@ import java.lang.annotation.Documented;
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
 
-import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 @Pattern.List({

Modified: bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/constraints/FrenchZipCode.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/constraints/FrenchZipCode.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/constraints/FrenchZipCode.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/constraints/FrenchZipCode.java Fri Aug 16 15:35:08 2013
@@ -28,7 +28,9 @@ import java.lang.annotation.Documented;
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
 
-import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 /**

Modified: bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/constraints/HasValue.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/constraints/HasValue.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/constraints/HasValue.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/constraints/HasValue.java Fri Aug 16 15:35:08 2013
@@ -23,7 +23,9 @@ import javax.validation.Payload;
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
 
-import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 /**

Modified: bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/BeanDescriptorTest.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/BeanDescriptorTest.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/BeanDescriptorTest.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/BeanDescriptorTest.java Fri Aug 16 15:35:08 2013
@@ -18,18 +18,10 @@
  */
 package org.apache.bval.jsr303;
 
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import junit.framework.Assert;
+import junit.framework.TestCase;
 import org.apache.bval.jsr303.util.TestUtils;
 
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import java.util.Locale;
-import java.util.Set;
-
 import javax.validation.Constraint;
 import javax.validation.Payload;
 import javax.validation.Validation;
@@ -37,11 +29,22 @@ import javax.validation.Validator;
 import javax.validation.ValidatorFactory;
 import javax.validation.constraints.NotNull;
 import javax.validation.groups.Default;
-import javax.validation.metadata.*;
+import javax.validation.metadata.BeanDescriptor;
+import javax.validation.metadata.ConstraintDescriptor;
+import javax.validation.metadata.ElementDescriptor;
 import javax.validation.metadata.ElementDescriptor.ConstraintFinder;
+import javax.validation.metadata.PropertyDescriptor;
+import javax.validation.metadata.Scope;
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import java.util.Locale;
+import java.util.Set;
 
-import junit.framework.Assert;
-import junit.framework.TestCase;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 /**
  * Tests the implementation of {@link BeanDescriptor} and its dependent

Modified: bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/BootstrapTest.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/BootstrapTest.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/BootstrapTest.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/BootstrapTest.java Fri Aug 16 15:35:08 2013
@@ -18,11 +18,10 @@
  */
 package org.apache.bval.jsr303;
 
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Locale;
-import java.util.Set;
+import junit.framework.Assert;
+import junit.framework.TestCase;
+import org.apache.bval.constraints.NotNullValidator;
+import org.apache.bval.jsr303.example.Customer;
 
 import javax.validation.Configuration;
 import javax.validation.ConstraintValidator;
@@ -36,12 +35,11 @@ import javax.validation.Validator;
 import javax.validation.ValidatorFactory;
 import javax.validation.bootstrap.ProviderSpecificBootstrap;
 import javax.validation.spi.ValidationProvider;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.apache.bval.constraints.NotNullValidator;
-import org.apache.bval.jsr303.example.Customer;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Locale;
+import java.util.Set;
 
 /**
  * Description: <br/>

Modified: bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/CircularReferencesTest.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/CircularReferencesTest.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/CircularReferencesTest.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/CircularReferencesTest.java Fri Aug 16 15:35:08 2013
@@ -22,7 +22,11 @@ package org.apache.bval.jsr303;
 import junit.framework.Assert;
 import junit.framework.TestCase;
 
-import javax.validation.*;
+import javax.validation.ConstraintViolation;
+import javax.validation.Valid;
+import javax.validation.Validation;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
 import javax.validation.constraints.Size;
 import java.util.Locale;
 import java.util.Set;

Modified: bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/ComposedConstraintsTest.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/ComposedConstraintsTest.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/ComposedConstraintsTest.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/ComposedConstraintsTest.java Fri Aug 16 15:35:08 2013
@@ -18,8 +18,11 @@
  */
 package org.apache.bval.jsr303;
 
-import java.util.Locale;
-import java.util.Set;
+import junit.framework.Assert;
+import junit.framework.TestCase;
+import org.apache.bval.jsr303.example.CompanyAddress;
+import org.apache.bval.jsr303.example.FrenchAddress;
+import org.apache.bval.jsr303.util.TestUtils;
 
 import javax.validation.ConstraintViolation;
 import javax.validation.Validation;
@@ -28,13 +31,8 @@ import javax.validation.ValidatorFactory
 import javax.validation.constraints.Size;
 import javax.validation.metadata.ConstraintDescriptor;
 import javax.validation.metadata.ElementDescriptor;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.apache.bval.jsr303.example.CompanyAddress;
-import org.apache.bval.jsr303.example.FrenchAddress;
-import org.apache.bval.jsr303.util.TestUtils;
+import java.util.Locale;
+import java.util.Set;
 
 /**
  * Description: <br/>

Modified: bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/ConstraintCompositionTest.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/ConstraintCompositionTest.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/ConstraintCompositionTest.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/ConstraintCompositionTest.java Fri Aug 16 15:35:08 2013
@@ -19,17 +19,8 @@
 
 package org.apache.bval.jsr303;
 
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Annotation;
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import java.util.Locale;
-import java.util.Set;
+import junit.framework.Assert;
+import junit.framework.TestCase;
 
 import javax.validation.Constraint;
 import javax.validation.ConstraintViolation;
@@ -43,9 +34,17 @@ import javax.validation.constraints.NotN
 import javax.validation.constraints.Pattern;
 import javax.validation.constraints.Size;
 import javax.validation.metadata.ConstraintDescriptor;
+import java.lang.annotation.Annotation;
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import java.util.Locale;
+import java.util.Set;
 
-import junit.framework.Assert;
-import junit.framework.TestCase;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 /**
  * Checks that groups are correctly inherited from the root constraint to its

Modified: bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/ConstraintDefinitionsTest.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/ConstraintDefinitionsTest.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/ConstraintDefinitionsTest.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/ConstraintDefinitionsTest.java Fri Aug 16 15:35:08 2013
@@ -18,16 +18,9 @@
  */
 package org.apache.bval.jsr303;
 
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import java.util.Locale;
-import java.util.Set;
+import junit.framework.Assert;
+import junit.framework.TestCase;
+import org.apache.bval.constraints.NotNullValidator;
 
 import javax.validation.Constraint;
 import javax.validation.ConstraintDefinitionException;
@@ -38,11 +31,16 @@ import javax.validation.ValidatorFactory
 import javax.validation.constraints.Min;
 import javax.validation.metadata.BeanDescriptor;
 import javax.validation.metadata.ConstraintDescriptor;
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import java.util.Locale;
+import java.util.Set;
 
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.apache.bval.constraints.NotNullValidator;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 /**
  * Checks the correct parsing of constraint definitions.

Modified: bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/ContextConstraintValidatorFactoryTest.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/ContextConstraintValidatorFactoryTest.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/ContextConstraintValidatorFactoryTest.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/ContextConstraintValidatorFactoryTest.java Fri Aug 16 15:35:08 2013
@@ -18,13 +18,7 @@
  */
 package org.apache.bval.jsr303;
 
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import java.util.Locale;
-import java.util.Set;
+import junit.framework.TestCase;
 
 import javax.validation.Constraint;
 import javax.validation.ConstraintValidator;
@@ -34,8 +28,13 @@ import javax.validation.ConstraintViolat
 import javax.validation.Payload;
 import javax.validation.Validation;
 import javax.validation.ValidatorFactory;
-
-import junit.framework.TestCase;
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.util.Locale;
+import java.util.Set;
 
 /**
  * <a href="https://issues.apache.org/jira/browse/BVAL-111">https://issues.apache.org/jira/browse/BVAL-111</a>

Modified: bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/CustomConstraintValidatorFactoryTest.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/CustomConstraintValidatorFactoryTest.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/CustomConstraintValidatorFactoryTest.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/CustomConstraintValidatorFactoryTest.java Fri Aug 16 15:35:08 2013
@@ -44,7 +44,7 @@ import junit.framework.TestCase;
 /**
  * Checks that overriding the default {@link ConstraintValidatorFactory} works
  * as expected.
- * 
+ *
  * @author Carlos Vara
  */
 public class CustomConstraintValidatorFactoryTest extends TestCase {
@@ -55,7 +55,7 @@ public class CustomConstraintValidatorFa
      * validation exception should be thrown.
      */
     public void testValidationExceptionWhenFactoryReturnsNullValidator() {
-        
+
         ConstraintValidatorFactory customFactory = new ConstraintValidatorFactory() {
             // @Override - not allowed in 1.5 for Interface methods
             public <T extends ConstraintValidator<?, ?>> T getInstance(Class<T> key) {
@@ -66,11 +66,11 @@ public class CustomConstraintValidatorFa
                 // no-op
             }
         };
-        
+
         // Create a validator with this factory
         ApacheValidatorConfiguration customConfig = Validation.byProvider(ApacheValidationProvider.class).configure().constraintValidatorFactory(customFactory);
         Validator validator = customConfig.buildValidatorFactory().getValidator();
-        
+
         try {
             validator.validate(new Person());
             fail("ValidationException must be thrown when factory returns a null constraint validator.");
@@ -78,21 +78,21 @@ public class CustomConstraintValidatorFa
             // correct
         }
     }
-    
+
     @GoodPerson
     public static class Person {
     }
-    
+
     @Constraint(validatedBy = { GoodPersonValidator.class })
     @Target({ METHOD, FIELD, ANNOTATION_TYPE, TYPE })
     @Retention(RUNTIME)
     @Documented
     public static @interface GoodPerson {
-        
+
         String message() default "Not a good person";
         Class<?>[] groups() default { };
         Class<? extends Payload>[] payload() default {};
-        
+
         public static class GoodPersonValidator implements ConstraintValidator<GoodPerson, Person> {
             // @Override - not allowed in 1.5 for Interface methods
             public void initialize(GoodPerson constraintAnnotation) {
@@ -104,5 +104,5 @@ public class CustomConstraintValidatorFa
             }
         }
     }
-    
+
 }

Modified: bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/CustomValidatorFactoryTest.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/CustomValidatorFactoryTest.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/CustomValidatorFactoryTest.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/CustomValidatorFactoryTest.java Fri Aug 16 15:35:08 2013
@@ -20,7 +20,15 @@ package org.apache.bval.jsr303;
 
 import junit.framework.TestCase;
 
-import javax.validation.*;
+import javax.validation.ConstraintValidatorFactory;
+import javax.validation.MessageInterpolator;
+import javax.validation.ParameterNameProvider;
+import javax.validation.TraversableResolver;
+import javax.validation.Validation;
+import javax.validation.ValidationException;
+import javax.validation.Validator;
+import javax.validation.ValidatorContext;
+import javax.validation.ValidatorFactory;
 import javax.validation.spi.ConfigurationState;
 
 /**

Modified: bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/PayloadTest.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/PayloadTest.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/PayloadTest.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/PayloadTest.java Fri Aug 16 15:35:08 2013
@@ -18,8 +18,8 @@
  */
 package org.apache.bval.jsr303;
 
-import java.util.Locale;
-import java.util.Set;
+import junit.framework.TestCase;
+import org.apache.bval.jsr303.util.TestUtils;
 
 import javax.validation.ConstraintViolation;
 import javax.validation.Payload;
@@ -27,10 +27,8 @@ import javax.validation.Validation;
 import javax.validation.Validator;
 import javax.validation.ValidatorFactory;
 import javax.validation.constraints.NotNull;
-
-import junit.framework.TestCase;
-
-import org.apache.bval.jsr303.util.TestUtils;
+import java.util.Locale;
+import java.util.Set;
 
 /**
  * Description: test that payload information can be retrieved

Modified: bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/TckReproducerTest.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/TckReproducerTest.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/TckReproducerTest.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/TckReproducerTest.java Fri Aug 16 15:35:08 2013
@@ -27,7 +27,6 @@ import javax.validation.Validation;
 import javax.validation.Validator;
 import javax.validation.ValidatorFactory;
 import javax.validation.constraints.Pattern;
-
 import java.util.Locale;
 import java.util.Set;
 

Modified: bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/ValidationTest.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/ValidationTest.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/ValidationTest.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/ValidationTest.java Fri Aug 16 15:35:08 2013
@@ -18,31 +18,8 @@
  */
 package org.apache.bval.jsr303;
 
-import java.lang.reflect.Array;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-
-import javax.validation.ConstraintViolation;
-import javax.validation.Validation;
-import javax.validation.Validator;
-import javax.validation.ValidatorFactory;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-import javax.validation.groups.Default;
-import javax.validation.metadata.BeanDescriptor;
-import javax.validation.metadata.ConstraintDescriptor;
-import javax.validation.metadata.PropertyDescriptor;
-
 import junit.framework.Assert;
 import junit.framework.TestCase;
-
 import org.apache.bval.constraints.NotNullValidator;
 import org.apache.bval.jsr303.example.AccessTestBusinessObject;
 import org.apache.bval.jsr303.example.AccessTestBusinessObjectSub;
@@ -57,6 +34,27 @@ import org.apache.bval.jsr303.example.La
 import org.apache.bval.jsr303.example.RecursiveFoo;
 import org.apache.bval.jsr303.util.TestUtils;
 
+import javax.validation.ConstraintViolation;
+import javax.validation.Validation;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+import javax.validation.groups.Default;
+import javax.validation.metadata.BeanDescriptor;
+import javax.validation.metadata.ConstraintDescriptor;
+import javax.validation.metadata.PropertyDescriptor;
+import java.lang.reflect.Array;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
 /**
  * Description: <br/>
  */

Modified: bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/ValidatorResolutionTest.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/ValidatorResolutionTest.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/ValidatorResolutionTest.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/ValidatorResolutionTest.java Fri Aug 16 15:35:08 2013
@@ -20,14 +20,23 @@ package org.apache.bval.jsr303;
 
 import junit.framework.TestCase;
 
-import javax.validation.*;
+import javax.validation.Constraint;
+import javax.validation.ConstraintDefinitionException;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.Payload;
+import javax.validation.Validation;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
 import javax.validation.constraints.NotNull;
 import java.lang.annotation.Documented;
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
 import java.util.Locale;
 
-import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 

Modified: bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/example/Library.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/example/Library.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/example/Library.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/example/Library.java Fri Aug 16 15:35:08 2013
@@ -18,15 +18,14 @@
  */
 package org.apache.bval.jsr303.example;
 
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import javax.validation.Valid;
-import javax.validation.constraints.NotNull;
-
 /**
  * Description: <br/>
  */

Modified: bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/groups/CollectionValidationTest.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/groups/CollectionValidationTest.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/groups/CollectionValidationTest.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/groups/CollectionValidationTest.java Fri Aug 16 15:35:08 2013
@@ -18,17 +18,7 @@
  */
 package org.apache.bval.jsr303.groups;
 
-import java.util.ArrayList;
-import java.util.Locale;
-import java.util.Set;
-
-import javax.validation.ConstraintViolation;
-import javax.validation.Validation;
-import javax.validation.Validator;
-import javax.validation.ValidatorFactory;
-
 import junit.framework.TestCase;
-
 import org.apache.bval.jsr303.DefaultMessageInterpolator;
 import org.apache.bval.jsr303.example.Address;
 import org.apache.bval.jsr303.example.Author;
@@ -40,6 +30,14 @@ import org.apache.bval.jsr303.example.Li
 import org.apache.bval.jsr303.example.Person;
 import org.apache.bval.jsr303.util.TestUtils;
 
+import javax.validation.ConstraintViolation;
+import javax.validation.Validation;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
+import java.util.ArrayList;
+import java.util.Locale;
+import java.util.Set;
+
 /**
  * Description: <br/>
  */

Modified: bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/groups/GroupSequenceIsolationTest.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/groups/GroupSequenceIsolationTest.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/groups/GroupSequenceIsolationTest.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/groups/GroupSequenceIsolationTest.java Fri Aug 16 15:35:08 2013
@@ -22,7 +22,11 @@ import junit.framework.Assert;
 import junit.framework.TestCase;
 import org.apache.bval.jsr303.DefaultMessageInterpolator;
 
-import javax.validation.*;
+import javax.validation.ConstraintViolation;
+import javax.validation.GroupSequence;
+import javax.validation.Validation;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
 import javax.validation.constraints.NotNull;
 import javax.validation.groups.Default;
 import java.util.Locale;

Modified: bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/groups/GroupSequenceTest.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/groups/GroupSequenceTest.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/groups/GroupSequenceTest.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/groups/GroupSequenceTest.java Fri Aug 16 15:35:08 2013
@@ -23,11 +23,19 @@ import junit.framework.TestCase;
 import org.apache.bval.jsr303.ApacheValidatorFactory;
 import org.apache.bval.jsr303.DefaultMessageInterpolator;
 import org.apache.bval.jsr303.Jsr303Features;
-import org.apache.bval.jsr303.example.*;
+import org.apache.bval.jsr303.example.Author;
+import org.apache.bval.jsr303.example.Book;
+import org.apache.bval.jsr303.example.First;
+import org.apache.bval.jsr303.example.Last;
+import org.apache.bval.jsr303.example.Second;
 import org.apache.bval.jsr303.util.TestUtils;
 import org.apache.bval.model.MetaBean;
 
-import javax.validation.*;
+import javax.validation.ConstraintViolation;
+import javax.validation.GroupSequence;
+import javax.validation.Validation;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
 import javax.validation.constraints.NotNull;
 import java.util.List;
 import java.util.Locale;

Modified: bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/util/PathImplTest.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/util/PathImplTest.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/util/PathImplTest.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/util/PathImplTest.java Fri Aug 16 15:35:08 2013
@@ -18,15 +18,14 @@
  */
 package org.apache.bval.jsr303.util;
 
-import java.util.Iterator;
-
-import javax.validation.Path;
-import javax.validation.ValidationException;
-
 import junit.framework.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
+import javax.validation.Path;
+import javax.validation.ValidationException;
+import java.util.Iterator;
+
 /**
  * PathImpl Tester.
  *

Modified: bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/util/TestUtils.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/util/TestUtils.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/util/TestUtils.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/util/TestUtils.java Fri Aug 16 15:35:08 2013
@@ -18,15 +18,14 @@
  */
 package org.apache.bval.jsr303.util;
 
-import java.lang.annotation.Annotation;
-import java.util.Collection;
-import java.util.Set;
+import junit.framework.Assert;
 
 import javax.validation.ConstraintViolation;
 import javax.validation.metadata.ConstraintDescriptor;
 import javax.validation.metadata.ElementDescriptor.ConstraintFinder;
-
-import junit.framework.Assert;
+import java.lang.annotation.Annotation;
+import java.util.Collection;
+import java.util.Set;
 
 /**
  * Description: <br/>

Modified: bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/xml/ValidationParserTest.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/xml/ValidationParserTest.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/xml/ValidationParserTest.java (original)
+++ bval/branches/bval-11/bval-jsr303/src/test/java/org/apache/bval/jsr303/xml/ValidationParserTest.java Fri Aug 16 15:35:08 2013
@@ -27,7 +27,11 @@ import org.apache.bval.jsr303.Configurat
 import org.apache.bval.jsr303.example.XmlEntitySampleBean;
 import org.apache.bval.jsr303.resolver.SimpleTraversableResolver;
 
-import javax.validation.*;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validation;
+import javax.validation.ValidationException;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
 import java.io.IOException;
 import java.util.Set;
 

Modified: bval/branches/bval-11/bval-tck11/work-tests-suite.xml
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-tck11/work-tests-suite.xml?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-tck11/work-tests-suite.xml (original)
+++ bval/branches/bval-11/bval-tck11/work-tests-suite.xml Fri Aug 16 15:35:08 2013
@@ -21,9 +21,9 @@ think to add -Dvalidation.provider=org.a
 <suite name="tmp" verbose="1">
   <test name="tmp">
     <classes>
-      <class name="org.hibernate.beanvalidation.tck.tests.xmlconfiguration.groupconversion.GroupConversionTest">
+      <class name="org.hibernate.beanvalidation.tck.tests.constraints.invalidconstraintdefinitions.InvalidConstraintDefinitionsTest">
         <methods>
-          <include name="testGroupConversionsAppliedOnField" />
+
         </methods>
       </class>
     </classes>

Modified: bval/branches/bval-11/bval-xstream/src/main/java/org/apache/bval/routines/StandardValidation.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-xstream/src/main/java/org/apache/bval/routines/StandardValidation.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-xstream/src/main/java/org/apache/bval/routines/StandardValidation.java (original)
+++ bval/branches/bval-11/bval-xstream/src/main/java/org/apache/bval/routines/StandardValidation.java Fri Aug 16 15:35:08 2013
@@ -16,6 +16,18 @@
  */
 package org.apache.bval.routines;
 
+import org.apache.bval.model.Features;
+import org.apache.bval.model.MetaProperty;
+import org.apache.bval.model.Validation;
+import org.apache.bval.model.ValidationContext;
+import org.apache.bval.model.ValidationListener;
+import org.apache.bval.xml.XMLMetaValue;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
 import static org.apache.bval.model.Features.Property.MANDATORY;
 import static org.apache.bval.model.Features.Property.MAX_LENGTH;
 import static org.apache.bval.model.Features.Property.MAX_VALUE;
@@ -24,18 +36,6 @@ import static org.apache.bval.model.Feat
 import static org.apache.bval.model.Features.Property.REG_EXP;
 import static org.apache.bval.model.Features.Property.TIME_LAG;
 
-import java.util.Collection;
-import java.util.Date;
-import java.util.regex.Pattern;
-import java.util.regex.PatternSyntaxException;
-
-import org.apache.bval.model.Features;
-import org.apache.bval.model.MetaProperty;
-import org.apache.bval.model.Validation;
-import org.apache.bval.model.ValidationContext;
-import org.apache.bval.model.ValidationListener;
-import org.apache.bval.xml.XMLMetaValue;
-
 /**
  * Description: This class implements the standard validations for properties!
  * You can subclass this class and replace the implementation

Modified: bval/branches/bval-11/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanFactory.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanFactory.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanFactory.java (original)
+++ bval/branches/bval-11/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanFactory.java Fri Aug 16 15:35:08 2013
@@ -16,7 +16,11 @@
  */
 package org.apache.bval.xml;
 
-import static org.apache.bval.model.Features.Property.JAVASCRIPT_VALIDATION_FUNCTIONS;
+import org.apache.bval.MetaBeanFactory;
+import org.apache.bval.model.FeaturesCapable;
+import org.apache.bval.model.MetaBean;
+import org.apache.bval.model.MetaProperty;
+import org.apache.bval.routines.StandardValidation;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -28,11 +32,7 @@ import java.util.Map;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import org.apache.bval.MetaBeanFactory;
-import org.apache.bval.model.FeaturesCapable;
-import org.apache.bval.model.MetaBean;
-import org.apache.bval.model.MetaProperty;
-import org.apache.bval.routines.StandardValidation;
+import static org.apache.bval.model.Features.Property.JAVASCRIPT_VALIDATION_FUNCTIONS;
 
 /**
  * Description: Create or enrich MetaBeans from apache beanInfos xml<br/>

Modified: bval/branches/bval-11/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanInfos.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanInfos.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanInfos.java (original)
+++ bval/branches/bval-11/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaBeanInfos.java Fri Aug 16 15:35:08 2013
@@ -16,20 +16,19 @@
  */
 package org.apache.bval.xml;
 
+import com.thoughtworks.xstream.annotations.XStreamAlias;
+import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
+import com.thoughtworks.xstream.annotations.XStreamImplicit;
+import com.thoughtworks.xstream.annotations.XStreamOmitField;
+import org.apache.bval.model.Validation;
+import org.apache.commons.lang3.ClassUtils;
+
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
-import org.apache.bval.model.Validation;
-import org.apache.commons.lang3.ClassUtils;
-
-import com.thoughtworks.xstream.annotations.XStreamAlias;
-import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
-import com.thoughtworks.xstream.annotations.XStreamImplicit;
-import com.thoughtworks.xstream.annotations.XStreamOmitField;
-
 /**
  * Description: root element of a xml-beanInfos document<br/>
  */

Modified: bval/branches/bval-11/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaElement.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaElement.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaElement.java (original)
+++ bval/branches/bval-11/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaElement.java Fri Aug 16 15:35:08 2013
@@ -20,7 +20,12 @@ import com.thoughtworks.xstream.annotati
 import org.apache.bval.model.MetaProperty;
 import org.apache.commons.lang3.ClassUtils;
 
-import static org.apache.bval.model.Features.Property.*;
+import static org.apache.bval.model.Features.Property.DENIED;
+import static org.apache.bval.model.Features.Property.HIDDEN;
+import static org.apache.bval.model.Features.Property.MANDATORY;
+import static org.apache.bval.model.Features.Property.MAX_LENGTH;
+import static org.apache.bval.model.Features.Property.MIN_LENGTH;
+import static org.apache.bval.model.Features.Property.READONLY;
 
 /**
  * Description: <br/>

Modified: bval/branches/bval-11/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaProperty.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaProperty.java?rev=1514750&r1=1514749&r2=1514750&view=diff
==============================================================================
--- bval/branches/bval-11/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaProperty.java (original)
+++ bval/branches/bval-11/bval-xstream/src/main/java/org/apache/bval/xml/XMLMetaProperty.java Fri Aug 16 15:35:08 2013
@@ -20,7 +20,10 @@ import com.thoughtworks.xstream.annotati
 import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
 import org.apache.bval.model.MetaProperty;
 
-import static org.apache.bval.model.Features.Property.*;
+import static org.apache.bval.model.Features.Property.MAX_VALUE;
+import static org.apache.bval.model.Features.Property.MIN_VALUE;
+import static org.apache.bval.model.Features.Property.REG_EXP;
+import static org.apache.bval.model.Features.Property.TIME_LAG;
 
 /**
  * Description: <br/>



Mime
View raw message