Issue Type: Bug Bug
Affects Versions: 5.0.0.Alpha2
Assignee: Unassigned
Components: engine
Created: 05/Feb/13 2:12 AM
Description:

When validating a subtype with a property foo which extends a superclass which itself has a private constrained field foo, then constraints from that field in the supertype are evaluated as well, although the shouldn't.

Example:

public class InheritanceTest {


    private static class Base {
		
        @Min(5)
        private final int i = 0;
    }
	
    private static class Sub extends Base {
		
        private final int i = 0;
    }
	
	@Test
    public void testInheritance() {
        Set<ConstraintViolation<Sub>> violations = Validation
            .buildDefaultValidatorFactory()
            .getValidator()
            .validate( new Sub() );
	    
        assertTrue(
            violations.isEmpty(),
            "There should be no violations as the constraints from the supertype field shouldn't apply."
        );
    }
}
Fix Versions: 5.x
Project: Hibernate Validator
Priority: Major Major
Reporter: Gunnar Morling
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira