X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-clustering-commons%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Fnode%2Futils%2FPathUtils.java;h=1dd0f3b8278407752b91afbb24548eb857385cbc;hb=8177f2bec0e489b12d7711d4d7758295ba308ee0;hp=cf5174319d2128518f70391d0d459ad5af26b2cf;hpb=c74d5c2399e500fe3e690edc8cee497b1cb6f867;p=controller.git diff --git a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/PathUtils.java b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/PathUtils.java index cf5174319d..1dd0f3b827 100644 --- a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/PathUtils.java +++ b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/PathUtils.java @@ -12,18 +12,19 @@ package org.opendaylight.controller.cluster.datastore.node.utils; public class PathUtils { public static String getParentPath(String currentElementPath){ - String parentPath = ""; + StringBuilder parentPath = new StringBuilder(); if(currentElementPath != null){ String[] parentPaths = currentElementPath.split("/"); if(parentPaths.length > 2){ for(int i=0;i 0){ - parentPath += "/" + parentPaths[i]; + parentPath.append("/"); + parentPath.append(parentPaths[i]); } } } } - return parentPath; + return parentPath.toString(); } }