Author: mbenson
Date: Thu Dec  1 23:15:35 2011
New Revision: 1209303

URL: http://svn.apache.org/viewvc?rev=1209303&view=rev
Log:
add a group to the default group redefinition to apply to a property so we test 
more

Modified:
    
incubator/bval/trunk/bval-jsr303/src/test/java/org/apache/bval/jsr303/groups/redefining/Address.java

Modified: 
incubator/bval/trunk/bval-jsr303/src/test/java/org/apache/bval/jsr303/groups/redefining/Address.java
URL: 
http://svn.apache.org/viewvc/incubator/bval/trunk/bval-jsr303/src/test/java/org/apache/bval/jsr303/groups/redefining/Address.java?rev=1209303&r1=1209302&r2=1209303&view=diff
==============================================================================
--- 
incubator/bval/trunk/bval-jsr303/src/test/java/org/apache/bval/jsr303/groups/redefining/Address.java
 (original)
+++ 
incubator/bval/trunk/bval-jsr303/src/test/java/org/apache/bval/jsr303/groups/redefining/Address.java
 Thu Dec  1 23:15:35 2011
@@ -32,25 +32,32 @@ import javax.validation.constraints.Size
  * this sequence expresses the sequence of groups that does
  * substitute Default for this class.
  */
-@GroupSequence({Address.class, Address.HighLevelCoherence.class})
+@GroupSequence({Address.class, Address.HighLevelCoherence.class, 
Address.ExtraCareful.class })
 @ZipCodeCityCoherence(groups = Address.HighLevelCoherence.class)
 public class Address implements ZipCodeCityCarrier {
-    @NotNull @Size(max = 50)
+    
+    /**
+     * check coherence on the overall object
+     * Needs basic checking to be green first
+     */
+    public interface HighLevelCoherence {}
+    
+    /**
+     * Extra-careful validation group.
+     */
+    public interface ExtraCareful {}
+
+    @NotNull
+    @Size(max = 50, min = 1, groups = ExtraCareful.class)
     private String street1;
 
     @NotNull 
     private String zipCode;
-
+    
     @NotNull
     @Size(max = 30)
     private String city;
 
-    /**
-     * check coherence on the overall object
-     * Needs basic checking to be green first
-     */
-    public interface HighLevelCoherence {}
-
     public String getStreet1() {
         return street1;
     }


Reply via email to