Currently exact semantics are unspecified for situations where @ConvertGroup is given for a property of a base class and again on a sub-class (same for interface and impl):
public class Foo {
@Valid
@ConvertGroup(from=Default.class, to=AnotherGroup.class)
Bar getBar() { ... }
}
public class Baz extends Foo {
@Override
@Valid
@ConvertGroup(from=SomeGroup.class, to=YetAnotherGroup.class)
Bar getBar() { ... }
}
Possible options:
Merge all the conversions for a property from the hierarchy (so behavior is the same as when all conversions would have been given in one place using @ConvertGroup.List)
Consider only the top/bottom most conversion rule from the inheritance hierarchy
Allow only one conversion for a property in the hierarchy, throw an exception if multiple conversions are given
Favoured by Emmanuel and Gunnar is option 3.
The same issue arises when dealing with cascaded method parameters or return values.
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