bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1586877 - in /bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr: ClassValidator.java ConstraintValidation.java
Date Sat, 12 Apr 2014 16:44:35 GMT
Author: rmannibucau
Date: Sat Apr 12 16:44:34 2014
New Revision: 1586877

URL: http://svn.apache.org/r1586877
Log:
BVAL-127 java 8 is stronger on ambiguity than java 6-7 so renaming an internal method to break
this ambiguity

Modified:
    bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/ClassValidator.java
    bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/ConstraintValidation.java

Modified: bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/ClassValidator.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/ClassValidator.java?rev=1586877&r1=1586876&r2=1586877&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/ClassValidator.java (original)
+++ bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/ClassValidator.java Sat
Apr 12 16:44:34 2014
@@ -832,7 +832,7 @@ public class ClassValidator implements C
                 for (final ConstraintDescriptor<?> constraintDescriptor : paramDesc.getConstraintDescriptors())
{
                     final ConstraintValidation<?> validation = ConstraintValidation.class.cast(constraintDescriptor);
                     parametersContext.setCurrentGroup(paramDesc.mapGroup(current));
-                    validation.validate(parametersContext);
+                    validation.validateGroupContext(parametersContext);
                 }
                 parametersContext.moveUp(null, null);
             }
@@ -840,7 +840,7 @@ public class ClassValidator implements C
             for (final ConstraintDescriptor<?> d : crossParamConstraints) {
                 final ConstraintValidation<?> validation = ConstraintValidation.class.cast(d);
                 crossParameterContext.setCurrentGroup(crossParamDescriptor.mapGroup(current));
-                validation.validate(crossParameterContext);
+                validation.validateGroupContext(crossParameterContext);
             }
 
             if (gps.length == 0 && parametersContext.getListener().getConstraintViolations().size()
+ crossParameterContext.getListener().getConstraintViolations().size() > 0) {
@@ -871,7 +871,7 @@ public class ClassValidator implements C
                     for (final ConstraintDescriptor<?> constraintDescriptor : paramDesc.getConstraintDescriptors())
{
                         final ConstraintValidation<?> validation = ConstraintValidation.class.cast(constraintDescriptor);
                         parametersContext.setCurrentGroup(paramDesc.mapGroup(current));
-                        validation.validate(parametersContext);
+                        validation.validateGroupContext(parametersContext);
                     }
                     parametersContext.moveUp(null, null);
                 }
@@ -879,7 +879,7 @@ public class ClassValidator implements C
                 for (final ConstraintDescriptor<?> d : crossParamConstraints) {
                     final ConstraintValidation<?> validation = ConstraintValidation.class.cast(d);
                     crossParameterContext.setCurrentGroup(crossParamDescriptor.mapGroup(current));
-                    validation.validate(crossParameterContext);
+                    validation.validateGroupContext(crossParameterContext);
                 }
 
                 if (parametersContext.getListener().getConstraintViolations().size() + crossParameterContext.getListener().getConstraintViolations().size()
> 0) {
@@ -996,7 +996,7 @@ public class ClassValidator implements C
             for (final ConstraintDescriptor<?> d : returnedValueConstraints) {
                 final ConstraintValidation<?> validation = ConstraintValidation.class.cast(d);
                 context.setCurrentGroup(returnedValueDescriptor.mapGroup(current));
-                validation.validate(context);
+                validation.validateGroupContext(context);
             }
 
             if (gps.length == 0 && !context.getListener().getConstraintViolations().isEmpty())
{
@@ -1025,7 +1025,7 @@ public class ClassValidator implements C
                     final ConstraintValidation<?> validation = ConstraintValidation.class.cast(d);
                     // context.setCurrentGroup(returnedValueDescriptor.mapGroup(current));
// mapping is only relevant for cascaded validations
                     context.setCurrentGroup(current);
-                    validation.validate(context);
+                    validation.validateGroupContext(context);
                 }
 
                 if (!context.getListener().getConstraintViolations().isEmpty()) {
@@ -1146,13 +1146,13 @@ public class ClassValidator implements C
             // 1. process groups
             for (final Group current : groups.getGroups()) {
                 context.setCurrentGroup(current);
-                validation.validate(context);
+                validation.validateGroupContext(context);
             }
             // 2. process sequences
             for (final List<Group> eachSeq : groups.getSequences()) {
                 for (final Group current : eachSeq) {
                     context.setCurrentGroup(current);
-                    validation.validate(context);
+                    validation.validateGroupContext(context);
                     /**
                      * if one of the group process in the sequence leads to one
                      * or more validation failure, the groups following in the

Modified: bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/ConstraintValidation.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/ConstraintValidation.java?rev=1586877&r1=1586876&r2=1586877&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/ConstraintValidation.java
(original)
+++ bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/ConstraintValidation.java
Sat Apr 12 16:44:34 2014
@@ -143,7 +143,7 @@ public class ConstraintValidation<T exte
      * {@inheritDoc}
      */
     public <L extends ValidationListener> void validate(ValidationContext<L>
context) {
-        validate((GroupValidationContext<?>) context);
+        validateGroupContext((GroupValidationContext<?>) context);
     }
 
     /**
@@ -151,7 +151,7 @@ public class ConstraintValidation<T exte
      *
      * @param context root
      */
-    public void validate(final GroupValidationContext<?> context) {
+    public void validateGroupContext(final GroupValidationContext<?> context) {
         if (validator == null) {
             synchronized (this) {
                 if (validator == null) {



Mime
View raw message