<div dir="ltr">Hi,<div><br></div><div style>We added the method addParameterNode() to the node builder API, allowing for the creation of custom subpaths in cross-parameter constraint validators.</div><div style><br></div><div style>
Currently such a path will look like this (the first two nodes are the default ones, the remain ones are custom created nodes):</div><div style><br></div><div style>METHOD -&gt; CROSS_PARAMETER -&gt; PARAMETER -&gt; ...</div>
<div style><br></div><div style>I&#39;m wondering whether it wouldn&#39;t be better to get rid of the cross-parameter node in this case:</div><div style><br></div><div style>METHOD -&gt; PARAMETER -&gt; ...<br></div><div style>
<br></div><div style>E.g. when looking at the following example:</div><div style><br></div><div style>    @OldAndNewPasswordDifferent</div><div style>    public void resetPassword(String new, String old) { ... }</div><div style>
<br></div><div style>Then I think the following path might be what constraint authors want:</div><div style><br></div><div style>MethodNode(&quot;resetPassword&quot;) -&gt; ParameterNode(&quot;old&quot;, arg1)</div><div style>
<br></div><div style>As it seems, the RI does the same when custom nodes are added in class-level constraint validators (i.e. no node for the class-level constraint will be part of the path). Shortly looking in the spec, I couldn&#39;t find an example mandating this behavior, though.</div>
<div style><br></div><div style>Any thoughts?</div><div style><br></div><div style>--Gunnar</div><div style><br></div></div>