Emmanuel Bernard commented on Improvement BVAL-332

We are agreeing that @ConvertGroup can only be defined when @Valid is defined. This solves the problem of defining @ConvertGroup several times in the class hierarchy and avoid the problem of violating the Liskov substitution principle:

  • @Valid can only be defined at the top level for params as per the existing rules
  • @Valid can be defined on return values

We are adding a rule that enforce that @Valid can only be defined once per class hierarchy. This solves again the risk of defining it twice and thus being able to define @ConvertGroup twice which would trigger the Liskov BSOD.

There is one remaining problem: In case of parallel interfaces defining the same method, the return value can host constraints which means we could define @Valid on both interfaces and thus have parallel @ConvertGroup rules and contradictions. The easy solution is to add a provision rule forbidding to have @ConvertGroup twice in this case.

If we find a better solution over the week end we can change that

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