Group inheritance acts like Group sequence with @ConvertGroup

Description

A group which inherits another group behaves unexpected when using @ConvertGroup
It acts like an expanded group sequence where each individual group can be converted, but this conflicts with how inheritance is specified:

For a given interface Z, constraints marked as belonging to the group Z (i.e. where the annotation element groups contains the interface Z) or any of the super interfaces of Z (inherited groups) are considered part of the group Z.

This section makes no mention of expanding the group, but says instead that validations of inherited groups become part of the inheriting group.

Since the groups should not be expanded I would not expect them to be converted separately from the inheriting group.

I've attached a testcase that demonstrates the behaviour. It has a group A, and a group B which extends A. Group C is separate and converted to. The validator is called with group B, and I have conversions from both A and B to C. I'd expect only the conversion from B to C to have effect. Conversion from B to C should also stop validations of group A.

Environment

None

Activity

Show:
Eric Jan Malotaux
October 29, 2019, 3:25 PM

Has no one else this issue? It is still present in 6.1.0.Final.

Assignee

Unassigned

Reporter

Maarten van der Zwaart

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Affects versions

Priority

Major