Hi experts,<br><br>I&#39;ve got a question regarding the re-definition of default group sequences in inheritance hierarchies, more specifically about the test method GroupSequenceIsolationTest#testCorrectDefaultSequenceInheritance3() in the TCK [1].<br>

<br>There are the following two classes and validation groups defined:<br><br>@GroupSequence({ Minimal.class, A.class })<br>public class A {<br><br>    @Max(value = 10, groups = Minimal.class)<br>    int size;<br><br>    @Size(max = 20)<br>

    String name; //A group<br>}<br><br>interface Minimal {}<br><br>interface Heavy {}<br><br>public class B3 extends A {<br><br>    @SafeEncryption(groups = Heavy.class)<br>    String encryptionKey;<br><br>    @Size(max = 20)<br>

    String nickname;<br>}<br><br>The test looks like this:<br><br>B3 b = new B3();<br><br>//all values invalid<br><a href="http://b.name" target="_blank">b.name</a> = &quot;this name is too long&quot;;<br>b.nickname = &quot;and this nickname as well&quot;;<br>

b.size = 20;<br>b.encryptionKey = &quot;not safe&quot;;<br><br>Set&lt;ConstraintViolation&lt;B3&gt;&gt; violations = validator.validate( b );<br>assertCorrectNumberOfViolations( violations, 2 );<br>assertCorrectConstraintTypes( violations, Max.class, Size.class );<br>

assertCorrectPropertyPaths( violations, &quot;size&quot;, &quot;nickname&quot; );<br><br>So, based on the assertions, the re-defined default group sequence only applies to the constraints defined on A but not on those defined on B3.<div>

<br></div><div>I&#39;m wondering why that is. Intuitively I would have expected that the re-definition of the default group applies to all types of the hierarchy, so one can re-define the default group at the top of an inheritance hierarchy.</div>
<div><br></div>
<div>Does anyone know/remember why the behavior is defined like it is?</div><div><br></div><div>Thanks,</div><div><br></div><div>--Gunnar</div><div><br>[1] <a href="https://github.com/beanvalidation/beanvalidation-tck/blob/master/tests/src/main/java/org/hibernate/beanvalidation/tck/tests/constraints/groups/groupsequenceisolation/GroupSequenceIsolationTest.java#L134" target="_blank">https://github.com/beanvalidation/beanvalidation-tck/blob/master/tests/src/main/java/org/hibernate/beanvalidation/tck/tests/constraints/groups/groupsequenceisolation/GroupSequenceIsolationTest.java#L134</a><br>

</div><div><br></div>