BUG-509: Fix a constructor typo/thinko
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / java / org / opendaylight / controller / md / sal / dom / store / impl / tree / TreeNodeUtils.java
index a2a706a9da3f84b197aaa80d57487b89ff2cb55b..b2ec119ca942ac33ba2b7fbdecbaf26ee5831ceb 100644 (file)
@@ -43,7 +43,7 @@ public class TreeNodeUtils {
 
     public static <T extends StoreTreeNode<T>> T findNodeChecked(final T tree, final InstanceIdentifier path) {
         T current = tree;
-        List<PathArgument> nested = new ArrayList<>(path.getPath());
+        List<PathArgument> nested = new ArrayList<>(path.getPath().size());
         for(PathArgument pathArg : path.getPath()) {
             Optional<T> potential = current.getChild(pathArg);
             nested.add(pathArg);