Author: allee8285
Date: Thu May 2 21:28:12 2013
New Revision: 1478562
URL: http://svn.apache.org/r1478562
Log:
BVAL-116 Fix incorrect reporting of validation error after multiple composite
keys are processed.
Modified:
bval/branches/0.4.x-incubating/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintValidationListener.java
bval/branches/0.4.x-incubating/bval-jsr303/src/test/java/org/apache/bval/jsr303/example/FrenchAddress.java
bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintValidationListener.java
bval/trunk/bval-jsr303/src/test/java/org/apache/bval/jsr303/example/FrenchAddress.java
Modified:
bval/branches/0.4.x-incubating/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintValidationListener.java
URL:
http://svn.apache.org/viewvc/bval/branches/0.4.x-incubating/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintValidationListener.java?rev=1478562&r1=1478561&r2=1478562&view=diff
==============================================================================
---
bval/branches/0.4.x-incubating/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintValidationListener.java
(original)
+++
bval/branches/0.4.x-incubating/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintValidationListener.java
Thu May 2 21:28:12 2013
@@ -170,6 +170,10 @@ public final class ConstraintValidationL
* @return <code>true</code> as this call caused the listener to exit
report-as-single-violation mode
*/
public boolean endReportAsSingle() {
- return --compositeDepth == 0;
+ boolean endOutMostReportAsSingle = (--compositeDepth == 0);
+ if( endOutMostReportAsSingle ) {
+ hasCompositeError = false;
+ }
+ return endOutMostReportAsSingle;
}
}
Modified:
bval/branches/0.4.x-incubating/bval-jsr303/src/test/java/org/apache/bval/jsr303/example/FrenchAddress.java
URL:
http://svn.apache.org/viewvc/bval/branches/0.4.x-incubating/bval-jsr303/src/test/java/org/apache/bval/jsr303/example/FrenchAddress.java?rev=1478562&r1=1478561&r2=1478562&view=diff
==============================================================================
---
bval/branches/0.4.x-incubating/bval-jsr303/src/test/java/org/apache/bval/jsr303/example/FrenchAddress.java
(original)
+++
bval/branches/0.4.x-incubating/bval-jsr303/src/test/java/org/apache/bval/jsr303/example/FrenchAddress.java
Thu May 2 21:28:12 2013
@@ -42,4 +42,7 @@ public class FrenchAddress {
this.zipCode = zipCode;
}
+ @FrenchZipCode
+ String zipCode2 = "123456";
+
}
Modified:
bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintValidationListener.java
URL:
http://svn.apache.org/viewvc/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintValidationListener.java?rev=1478562&r1=1478561&r2=1478562&view=diff
==============================================================================
---
bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintValidationListener.java
(original)
+++
bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintValidationListener.java
Thu May 2 21:28:12 2013
@@ -170,6 +170,10 @@ public final class ConstraintValidationL
* @return <code>true</code> as this call caused the listener to exit
report-as-single-violation mode
*/
public boolean endReportAsSingle() {
- return --compositeDepth == 0;
+ boolean endOutMostReportAsSingle = (--compositeDepth == 0);
+ if( endOutMostReportAsSingle ) {
+ hasCompositeError = false;
+ }
+ return endOutMostReportAsSingle;
}
}
Modified:
bval/trunk/bval-jsr303/src/test/java/org/apache/bval/jsr303/example/FrenchAddress.java
URL:
http://svn.apache.org/viewvc/bval/trunk/bval-jsr303/src/test/java/org/apache/bval/jsr303/example/FrenchAddress.java?rev=1478562&r1=1478561&r2=1478562&view=diff
==============================================================================
---
bval/trunk/bval-jsr303/src/test/java/org/apache/bval/jsr303/example/FrenchAddress.java
(original)
+++
bval/trunk/bval-jsr303/src/test/java/org/apache/bval/jsr303/example/FrenchAddress.java
Thu May 2 21:28:12 2013
@@ -42,4 +42,7 @@ public class FrenchAddress {
this.zipCode = zipCode;
}
+ @FrenchZipCode
+ String zipCode2 = "123456";
+
}