You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bval.apache.org by mb...@apache.org on 2010/09/22 16:22:40 UTC

svn commit: r999971 - /incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/constraints/dynamic/AbstractValuesValidator.java

Author: mbenson
Date: Wed Sep 22 14:22:39 2010
New Revision: 999971

URL: http://svn.apache.org/viewvc?rev=999971&view=rev
Log:
adjust to renamed constraint attribute

Modified:
    incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/constraints/dynamic/AbstractValuesValidator.java

Modified: incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/constraints/dynamic/AbstractValuesValidator.java
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/constraints/dynamic/AbstractValuesValidator.java?rev=999971&r1=999970&r2=999971&view=diff
==============================================================================
--- incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/constraints/dynamic/AbstractValuesValidator.java (original)
+++ incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/constraints/dynamic/AbstractValuesValidator.java Wed Sep 22 14:22:39 2010
@@ -35,7 +35,7 @@ import org.apache.bval.constraints.dynam
 public abstract class AbstractValuesValidator<A extends Annotation, T> implements ConstraintValidator<A, T> {
 
     private Set<String> choices;
-    private Values.Rule inclusivity;
+    private Values.Rule rule;
 
     /**
      * {@inheritDoc}
@@ -43,7 +43,7 @@ public abstract class AbstractValuesVali
     public void initialize(A constraintAnnotation) {
         this.choices = new HashSet<String>();
         addChoicesFrom(constraintAnnotation, this.choices);
-        this.inclusivity = getInclusivity(constraintAnnotation);
+        this.rule = getRule(constraintAnnotation);
     }
 
     /**
@@ -55,12 +55,12 @@ public abstract class AbstractValuesVali
     protected abstract void addChoicesFrom(A constraint, Set<String> toSet);
 
     /**
-     * Extract an {@link Rule} from the specified constraint.
+     * Extract the {@link Rule} from the specified constraint.
      *
      * @param constraint
      * @return {@link Rule}
      */
-    protected abstract Values.Rule getInclusivity(A constraint);
+    protected abstract Values.Rule getRule(A constraint);
 
     /**
      * {@inheritDoc}
@@ -76,7 +76,7 @@ public abstract class AbstractValuesVali
                 break;
             }
         }
-        return matched ^ inclusivity == Rule.EXCLUDE;
+        return matched ^ rule == Rule.EXCLUDE;
     }
 
     /**
@@ -106,7 +106,7 @@ public abstract class AbstractValuesVali
          * {@inheritDoc}
          */
         @Override
-        protected Rule getInclusivity(Values constraint) {
+        protected Rule getRule(Values constraint) {
             return constraint.rule();
         }
     }
@@ -131,7 +131,7 @@ public abstract class AbstractValuesVali
          * {@inheritDoc}
          */
         @Override
-        protected Rule getInclusivity(org.apache.bval.constraints.dynamic.Values.Labeled constraint) {
+        protected Rule getRule(org.apache.bval.constraints.dynamic.Values.Labeled constraint) {
             return constraint.rule();
         }
     }