NPE when validating an object tree whith a class whose parent has defined property constraints

Description

Today I switched from HV 5.0.1 to 5.2.1 and happily enough to know that it was claimed to be a drop-in replacement for all 5.x versions, I started my code and WOW! My code throws NPE at our initial system validations with this stack trace:

Working a little bit on the issue, I could manage to reproduce it in a simple unit test that I've attached. I repeat it here for the sake of description.

Suppose that we have these simple classes:

If I want to validate an instance of MainBean which has an instance of BottomBean as its child, the mentioned exception occurs!

I searched the issue database to find that has already reported this same issue, but since there has been no test cases, the issue was resolved with "Cannot Reproduce". As I could not reopen the issue, I decided to report it here since I think it is a downside to a very reliable library.

Environment

Java: 8u60
HV: 5.2.1.Final
TestNG 6.9.5

Status

Assignee

Gunnar Morling

Reporter

Hamid Nazari

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

Yes, likely

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Affects versions

Priority

Major
Configure