I have a test like below:
public class TestSizeAnnotation
{
public static void main(String[] args)
{
System.out.println(Validation.buildDefau
Overriding validation annotations is actually not supported for JSR-303. Instead annotations on overridden methods in the subclass will be applied cumulatively: From section 3.3 of the specification:
A constraint declaration can be placed on an interface. For a given class, constraint declarations held on super- classes as well as interfaces are evaluated by the Bean Validation provider. Rules are formally described in Section 3.4.5. The effect of constraint declarations is cumulative. Constraints declared on a superclass getter will be validated along with any constraints defined on an overridden version of the getter according to the Java Language Specification visibility rules.