<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Hi Matt,<br></div><div class="gmail_quote"><br>On Tue, Apr 3, 2018 at 11:22 PM, Matt Benson <span dir="ltr">&lt;<a href="mailto:mbenson@apache.org" target="_blank">mbenson@apache.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello, I am encountering failures on three tests from<br>
MethodValidationTest in the TCK:<br>
<br>
* #<wbr>constructorParameterValidation<wbr>WithRedefinedDefaultGroupSeque<wbr>nce()<br>
* #<wbr>methodParameterValidationWithR<wbr>edefinedDefaultGroupSequence()<br>
* #<wbr>methodReturnValueValidationWit<wbr>hRedefinedDefaultGroupSequence<wbr>()<br>
<br>
In each case I am failing to pick up a @Size constraint from the<br>
Default group of an Item parameter or Order return value. However, due<br>
to the group sequence redefinition of Basic, Default on the bean class<br>
in question I am confused as to why I am expected to pick up the<br>
failures from the Default group after having encountered a @NotNull<br>
constraint violation in the Basic group. Thanks for any help here.<br></blockquote><div><br></div><div>I would tend to agree with you. (The fact that Item also has a different Basic group does not help to understand the issue though).<br><br></div><div>AFAIU the spec (<a href="http://beanvalidation.org/2.0/spec/#constraintdeclarationvalidationprocess-validationroutine-methodconstructorvalidation">http://beanvalidation.org/2.0/spec/#constraintdeclarationvalidationprocess-validationroutine-methodconstructorvalidation</a>), we should do:<br></div><div>- For each group<br></div><div>  - For each parameter, apply constraints<br></div><div>  - For each cascading parameter, cascade<br></div></div><br></div><div class="gmail_extra">This in no particular order if there is no group sequence. If a group sequence is defined, we should exit as soon as we have a violation for a given group<br><br></div><div class="gmail_extra">Currently, the RI does:<br></div><div class="gmail_extra">- For each group<br></div><div class="gmail_extra">  - For each parameter, apply constraints<br></div><div class="gmail_extra">    - exit as soon as I have a constraint if group sequence<br></div><div class="gmail_extra">- For each group<br></div><div class="gmail_extra">  - For each cascading parameter, cascade<br>    - exit as soon as I have a constraint if group sequence<br><br></div><div class="gmail_extra">In the aforementioned case:<br></div><div class="gmail_extra">1/ we apply the Basic constraints for the parameter constraints<br></div><div class="gmail_extra">2/ we exit as soon as we have a violation, we don&#39;t validate the Default group<br></div><div class="gmail_extra">3/ we apply cascading<br></div><div class="gmail_extra">   - no violation for the Basic group<br></div><div class="gmail_extra">   - we validate the default group<br></div><div class="gmail_extra">   - we exit as soon as we have a violation<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">As per spec, I think we should exit just after 2/<br><br></div><div class="gmail_extra">Gunnar, any insights?<br></div><div class="gmail_extra"><br>-- <br></div><div class="gmail_extra">Guillaume<br></div></div>