<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 -> CROSS_PARAMETER -> PARAMETER -> ...</div>
<div style><br></div><div style>I'm wondering whether it wouldn't be better to get rid of the cross-parameter node in this case:</div><div style><br></div><div style>METHOD -> PARAMETER -> ...<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("resetPassword") -> ParameterNode("old", 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'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>