<div dir="ltr">&gt; <span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">I can appreciate that, when taking TestEntity&#39;s</span><br style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">redefinition of Default into account, Complete&#39;s sequence evaluates to</span><br style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">[ TimeConsumingChecks, TestEntity, TimeConsumingChecks]. This is</span><br style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">clearly repetitive/redundant, but is it really to be considered</span><br style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">cyclical?</span><div><font color="#500050"><br></font></div>I think this is key here. In 5.4.2, the spec says:<div><font color="#500050"><br></font></div>&gt; Groups defining a sequence and groups composing a sequence must not be involved in a cyclic dependency:<br>&gt; * either directly or indirectly<br>&gt; * either through cascaded sequence definitions or group inheritance<br>&gt; If a group containing such a circularity is evaluated, a GroupDefinitionException is raised.<div><font color="#500050"><br></font></div>I.e. you have a cycle between TimeConsumingChecks in the Complete group sequence (once the re-defined default group sequence has been expanded).<div><br></div><div>In that light the method name is indeed a bit misleading, and I wonder whether we have a simpler test in the TCK which just asserts that @GroupSequence({ TimeConsumingChecks, TestEntity, TimeConsumingChecks }) triggers the exception. I didn&#39;t check the assignments of the assertion ids.</div><div><br></div><div>--Gunnar<br><div><font color="#500050"><br></font><div class="gmail_extra"><br><div class="gmail_quote">2018-03-29 11:18 GMT+02:00 Guillaume Smet <span dir="ltr">&lt;<a href="mailto:guillaume.smet@gmail.com" target="_blank">guillaume.smet@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi Matt,<br><br></div>I must admit that I don&#39;t see either what the problem should be.<br><br></div>The exception in HV is coming from:<br><a href="https://github.com/hibernate/hibernate-validator/blob/master/engine/src/main/java/org/hibernate/validator/internal/engine/groups/DefaultValidationOrder.java#L115" target="_blank">https://github.com/hibernate/<wbr>hibernate-validator/blob/<wbr>master/engine/src/main/java/<wbr>org/hibernate/validator/<wbr>internal/engine/groups/<wbr>DefaultValidationOrder.java#<wbr>L115</a><br></div><div>which didn&#39;t help me either to understand the issue as the method is quite cryptic.<br><br></div><div>Gunnar, any idea?<span class="HOEnZb"><font color="#888888"><br><br>-- <br></font></span></div><span class="HOEnZb"><font color="#888888"><div>Guillaume<br></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 28, 2018 at 5:30 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
I&#39;m having trouble recognizing what about TestEntity is supposed to<br>
trigger the GroupDefinitionException in<br>
#testInvalidDefinitionOfDefaul<wbr>tSequenceInEntity() (for convenience,<br>
TestEntity is at [1]). The name of the test case suggests that the<br>
problem would be on TestEntity&#39;s own @GroupSequence, which aside from<br>
the order of the specified groups looks more or less like example 5.11<br>
near [2]. This suggests that the test case is imperfectly named (the<br>
name also seems misaligned with the accompanying @SpecAssertions) and<br>
the focus intends to be on the Complete group of which validation is<br>
attempted as the last activity of the test. Complete again looks<br>
topographically identical to example 5.10 in the previous section of<br>
the specification, which suggests that there is nothing inherently<br>
wrong with it. I can appreciate that, when taking TestEntity&#39;s<br>
redefinition of Default into account, Complete&#39;s sequence evaluates to<br>
[ TimeConsumingChecks, TestEntity, TimeConsumingChecks]. This is<br>
clearly repetitive/redundant, but is it really to be considered<br>
cyclical? Is there any danger of infinite recursion and, if so, how?<br>
Is there some other problem I have missed here?<br>
<br>
Thanks,<br>
Matt<br>
<br>
[1] <a href="https://github.com/beanvalidation/beanvalidation-tck/blob/2.0/tests/src/main/java/org/hibernate/beanvalidation/tck/tests/constraints/groups/groupsequence/TestEntity.java" rel="noreferrer" target="_blank">https://github.com/beanvalidat<wbr>ion/beanvalidation-tck/blob/2.<wbr>0/tests/src/main/java/org/<wbr>hibernate/beanvalidation/tck/<wbr>tests/constraints/groups/group<wbr>sequence/TestEntity.java</a><br>
[2] <a href="http://beanvalidation.org/2.0/spec/#constraintdeclarationvalidationprocess-groupsequence-redefiningdefaultgroup" rel="noreferrer" target="_blank">http://beanvalidation.org/2.0/<wbr>spec/#constraintdeclarationval<wbr>idationprocess-groupsequence-r<wbr>edefiningdefaultgroup</a><br>
______________________________<wbr>_________________<br>
beanvalidation-dev mailing list<br>
<a href="mailto:beanvalidation-dev@lists.jboss.org" target="_blank">beanvalidation-dev@lists.jboss<wbr>.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/beanvalidation-dev</a><br>
</blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
beanvalidation-dev mailing list<br>
<a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.<wbr>jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/<wbr>beanvalidation-dev</a><br></blockquote></div><br></div></div></div></div>