Validator.validateProperty() honors @Valid annotation, but it shouldn't (regression)

Description

Let's assume the following code:

And the following validation checks:

These checks completed successfully, returning two sets, in HV 4.1.0. However, in HV 5.4.1, the second call throws an exception:

I checked the source code and it turns out, that the new implementation checks, whether the given property is cascading, before entering it (and throws the exception), whereas the implementation from HV 4.x - does not.

The migration guides do not mention any change in this place. The documentations for both HV 4.x and 5.x say that "@Valid" annotation is not honored by validateProperty() (section 2.2.2.3), which is not consistent with the actual behavior of HV 5.4.1. Both Bean Validation 1.0 and 1.1 say nothing about honoring @Valid annotation, but my experience with the specification is not big enough to make a clear conclusion here.

So this may be a violation of the specification (where the appropriate code change shall be made to fix it), or a regression with two possible solutions:

  1. reverting to the original behavior from HV 4.x,

  2. or updating the confusing note in the documentation.

Environment

None

Assignee

Unassigned

Reporter

Tomasz Jędrzejewski

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Affects versions

Priority

Minor
Configure