Increment the AAA dependency by 0.0.1 for post-Helium stability branch
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / utils / InstanceIdentifierUtils.java
index 20268a67449d2ff1bcddeef240b91ef4f287a774..c154b81e3567d19e6be40db61dbe41690ebca78e 100644 (file)
@@ -18,19 +18,21 @@ public class InstanceIdentifierUtils {
         .getLogger(InstanceIdentifierUtils.class);
 
     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 < parentPaths.length - 1; i++) {
                     if (parentPaths[i].length() > 0) {
-                        parentPath += "/" + parentPaths[i];
+                        parentPath.append( "/");
+                        parentPath.append( parentPaths[i]);
                     }
                 }
             }
         }
-        return parentPath;
+        return parentPath.toString();
     }
 
     @Deprecated