Skip to content

Commit

Permalink
HV-1480 We expect at least one node in the path so let's initialize the
Browse files Browse the repository at this point in the history
list with one element

It doesn't seem necessary to consider more elements as the list will be
copied when new nodes will be added.
  • Loading branch information
gsmet authored and gunnarmorling committed Oct 18, 2017
1 parent 17971aa commit 4b8189a
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -358,7 +358,7 @@ private PathImpl(PathImpl path) {
}

private PathImpl() {
nodeList = new ArrayList<>();
nodeList = new ArrayList<>( 1 );
hashCode = -1;
nodeListRequiresCopy = false;
}
Expand Down

0 comments on commit 4b8189a

Please sign in to comment.