|
Hi Hamid Nazari, thanks for the feedback and bug report. I added the following to ValidatorTest and I can confirm your NullPointerException:
@Test
@TestForIssue(jiraKey = "HV-1018")
public void testNullPointerExceptionInAppendPathOfValueContext() {
Validator validator = getValidator();
MainBean mainBean = new MainBean();
mainBean.child = new BottomBean();
Set<ConstraintViolation<MainBean>> constraintViolations = validator.validate( mainBean );
assertNumberOfViolations( constraintViolations, 1 );
}
public class MainBean {
@Valid
public TopBean child;
}
public class TopBean {
@NotNull
private String getProperty() {
return null;
}
}
public class BottomBean extends TopBean {
}
The problem seems to be related with the visibility of getProperty. If you make this method public all works as expected. I know we made changes around method validation which related to method visibility. This might be related. We need to have a closer look...
|