Skip to content

Commit 9c84921

Browse files
committed
HV-2127 Check if type argument info is the same before creating a new node
Signed-off-by: marko-bekhta <[email protected]>
1 parent f8129cb commit 9c84921

File tree

1 file changed

+3
-0
lines changed
  • engine/src/main/java/org/hibernate/validator/internal/engine/path

1 file changed

+3
-0
lines changed

engine/src/main/java/org/hibernate/validator/internal/engine/path/NodeImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,9 @@ public static NodeImpl setPropertyValue(NodeImpl node, Object value) {
287287
}
288288

289289
public static NodeImpl setTypeParameter(NodeImpl node, Class<?> containerClass, Integer typeArgumentIndex) {
290+
if ( node.typeArgumentIndex == typeArgumentIndex && node.containerClass == containerClass ) {
291+
return node;
292+
}
290293
return new NodeImpl(
291294
node.name,
292295
node.parent,

0 commit comments

Comments
 (0)