src/demo/share/jpda/com/sun/tools/example/debug/gui/ContextManager.java

Print this page
rev 10521 : 8055723[core]: Replace concat String to append in StringBuilder parameters
Contributed-by: Otavio Santana <otaviojava@java.net>

@@ -336,27 +336,17 @@
             StringBuilder munged = new StringBuilder(javaArgs);
             SearchPath classpath = classManager.getClassPath();
             if (classpath.isEmpty()) {
                 String envcp = System.getProperty("env.class.path");
                 if ((envcp != null) && (envcp.length() > 0)) {
-                    munged.append(" -classpath " + envcp);
+                    munged.append(" -classpath ").append(envcp);
                 }
             } else {
-                munged.append(" -classpath " + classpath.asString());
+                munged.append(" -classpath ").append(classpath.asString());
             }
             return munged.toString();
         } else {
             return javaArgs;
         }
     }
 
-    private String appendPath(String path1, String path2) {
-        if (path1 == null || path1.length() == 0) {
-            return path2 == null ? "." : path2;
-        } else if (path2 == null || path2.length() == 0) {
-            return path1;
-        } else {
-            return path1  + File.pathSeparator + path2;
-        }
-    }
-
 }