diff options
author | Lars Vogel | 2019-02-08 08:11:28 +0000 |
---|---|---|
committer | Lars Vogel | 2019-02-08 13:25:01 +0000 |
commit | 9b3404f38d2e68528422ecf82bdf80e563565844 (patch) | |
tree | 33ae0e1566648ad04832b5c4e081c41b5ac860cb | |
parent | 5bf1d62abd7f8c18a5c1e327b94ad367a72c98e3 (diff) | |
download | rt.equinox.framework-9b3404f38d2e68528422ecf82bdf80e563565844.tar.gz rt.equinox.framework-9b3404f38d2e68528422ecf82bdf80e563565844.tar.xz rt.equinox.framework-9b3404f38d2e68528422ecf82bdf80e563565844.zip |
Use StringBuilder in org.eclipse.equinox.launcher instead of
StringBuffer
Change-Id: I41a5ded22b030ff7ac65247ddc363342764212d5
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r-- | bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java | 12 | ||||
-rw-r--r-- | bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/WebStartMain.java | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java b/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java index 1663df278..05ddebd92 100644 --- a/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java +++ b/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java @@ -409,7 +409,7 @@ public class Main { } private String getFragmentString(String fragmentOS, String fragmentWS, String fragmentArch) { - StringBuffer buffer = new StringBuffer(PLUGIN_ID); + StringBuilder buffer = new StringBuilder(PLUGIN_ID); buffer.append('.'); buffer.append(fragmentWS); buffer.append('.'); @@ -746,7 +746,7 @@ public class Main { //them to spaces on certain class library implementations. if (urlString.indexOf('+') >= 0) { int len = urlString.length(); - StringBuffer buf = new StringBuffer(len); + StringBuilder buf = new StringBuilder(len); for (int i = 0; i < len; i++) { char c = urlString.charAt(i); if (c == '+') @@ -2512,7 +2512,7 @@ public class Main { protected String getDate(Date date) { Calendar c = Calendar.getInstance(); c.setTime(date); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); appendPaddedInt(c.get(Calendar.YEAR), 4, sb).append('-'); appendPaddedInt(c.get(Calendar.MONTH) + 1, 2, sb).append('-'); appendPaddedInt(c.get(Calendar.DAY_OF_MONTH), 2, sb).append(' '); @@ -2523,7 +2523,7 @@ public class Main { return sb.toString(); } - private StringBuffer appendPaddedInt(int value, int pad, StringBuffer buffer) { + private StringBuilder appendPaddedInt(int value, int pad, StringBuilder buffer) { pad = pad - 1; if (pad == 0) return buffer.append(Integer.toString(value)); @@ -2630,7 +2630,7 @@ public class Main { private void setMultiValueProperty(String property, String[] value) { if (value != null) { - StringBuffer result = new StringBuffer(300); + StringBuilder result = new StringBuilder(300); for (int i = 0; i < value.length; i++) { if (value[i] != null) { result.append(value[i]); @@ -2818,7 +2818,7 @@ public class Main { } public static String substituteVars(String path) { - StringBuffer buf = new StringBuffer(path.length()); + StringBuilder buf = new StringBuilder(path.length()); StringTokenizer st = new StringTokenizer(path, VARIABLE_DELIM_STRING, true); boolean varStarted = false; // indicates we are processing a var subtitute String var = null; // the current var key diff --git a/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/WebStartMain.java b/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/WebStartMain.java index 8406fd2dc..c2037ad9d 100644 --- a/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/WebStartMain.java +++ b/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/WebStartMain.java @@ -304,7 +304,7 @@ public class WebStartMain extends Main { //Build the osgi bundle list. The allbundles data structure is changed during the process. private void buildOSGiBundleList() { - StringBuffer finalBundleList = new StringBuffer(allBundles.size() * 30); + StringBuilder finalBundleList = new StringBuilder(allBundles.size() * 30); //First go through all the bundles of the bundle for (Iterator<BundleInfo> iterator = bundleList.iterator(); iterator.hasNext();) { BundleInfo searched = iterator.next(); |