Skip to content

Commit 16c19e5

Browse files
gsmetgunnarmorling
authored andcommitted
HV-1480 Even if not strictly necessary, the leaf node should be
correctly set in all constructors
1 parent 2e66bec commit 16c19e5

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,6 @@ private int buildHashCode() {
353353
*/
354354
private PathImpl(PathImpl path) {
355355
this( path.nodeList );
356-
currentLeafNode = (NodeImpl) nodeList.get( nodeList.size() - 1 );
357356
hashCode = path.hashCode;
358357
}
359358

@@ -365,6 +364,7 @@ private PathImpl() {
365364

366365
private PathImpl(List<Node> nodeList) {
367366
this.nodeList = nodeList;
367+
currentLeafNode = (NodeImpl) nodeList.get( nodeList.size() - 1 );
368368
hashCode = -1;
369369
nodeListRequiresCopy = true;
370370
}

0 commit comments

Comments
 (0)