diff options
author | Lars Vogel | 2019-06-19 14:23:32 +0000 |
---|---|---|
committer | Lars Vogel | 2019-06-19 14:44:02 +0000 |
commit | 496c088f41d1da914263e5a72beb80cccf48d9dc (patch) | |
tree | 039dedfc8f3cc60f0a267c359162e5e2d5a45027 /bundles | |
parent | d18100139d2ed08f94c31ebac43e2b336a6ec294 (diff) | |
download | rt.equinox.bundles-496c088f41d1da914263e5a72beb80cccf48d9dc.tar.gz rt.equinox.bundles-496c088f41d1da914263e5a72beb80cccf48d9dc.tar.xz rt.equinox.bundles-496c088f41d1da914263e5a72beb80cccf48d9dc.zip |
Use StringBuider instead of StringBuffer
Change-Id: Id6d5a4076aa0c7d063a55475698d95da62a394d8
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Diffstat (limited to 'bundles')
8 files changed, 12 insertions, 12 deletions
diff --git a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/ReferenceHashSet.java b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/ReferenceHashSet.java index 92b5b8a9b..1f4cdb1fa 100644 --- a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/ReferenceHashSet.java +++ b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/ReferenceHashSet.java @@ -306,7 +306,7 @@ public class ReferenceHashSet<T> { @Override public String toString() { - StringBuffer buffer = new StringBuffer("{"); //$NON-NLS-1$ + StringBuilder buffer = new StringBuilder("{"); //$NON-NLS-1$ for (int i = 0, length = this.values.length; i < length; i++) { HashedReference<T> value = this.values[i]; if (value != null) { diff --git a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Status.java b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Status.java index b76a41643..fe1835a07 100644 --- a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Status.java +++ b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Status.java @@ -240,7 +240,7 @@ public class Status implements IStatus { */ @Override public String toString() { - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); buf.append("Status "); //$NON-NLS-1$ if (severity == OK) { buf.append("OK"); //$NON-NLS-1$ diff --git a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/URIUtil.java b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/URIUtil.java index 83928adb5..bf2c944ab 100644 --- a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/URIUtil.java +++ b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/URIUtil.java @@ -104,7 +104,7 @@ public final class URIUtil { */ private static String ensureUNCPath(String path) { int len = path.length(); - StringBuffer result = new StringBuffer(len); + StringBuilder result = new StringBuilder(len); for (int i = 0; i < 4; i++) { // if we have hit the first non-slash character, add another leading slash if (i >= len || result.length() > 0 || path.charAt(i) != '/') @@ -315,7 +315,7 @@ public final class URIUtil { * @return An unencoded string representation of the URI */ public static String toUnencodedString(URI uri) { - StringBuffer result = new StringBuffer(); + StringBuilder result = new StringBuilder(); String scheme = uri.getScheme(); if (scheme != null) result.append(scheme).append(':'); diff --git a/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/command/adapter/CustomCommandInterpreter.java b/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/command/adapter/CustomCommandInterpreter.java index 0df4a59e5..b21f88fd6 100755 --- a/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/command/adapter/CustomCommandInterpreter.java +++ b/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/command/adapter/CustomCommandInterpreter.java @@ -261,7 +261,7 @@ public void printBundleResource(Bundle bundle, String resource) { texts that explain the command. */ public String getHelp() { - StringBuffer help = new StringBuffer(256); + StringBuilder help = new StringBuilder(256); help.append("---Controlling the Console---"); help.append(newline); help.append(tab); diff --git a/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/EquinoxCommandProvider.java b/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/EquinoxCommandProvider.java index bbad9b248..fbb1ef010 100755 --- a/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/EquinoxCommandProvider.java +++ b/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/EquinoxCommandProvider.java @@ -533,7 +533,7 @@ public class EquinoxCommandProvider implements SynchronousBundleListener { public void services(@Descriptor(ConsoleMsg.CONSOLE_HELP_FILTER_ARGUMENT_DESCRIPTION)String... filters) throws Exception { String filter = null; if (filters != null && filters.length > 0) { - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); for (String singleFilter : filters) { buf.append(' '); buf.append(singleFilter); @@ -1456,7 +1456,7 @@ public class EquinoxCommandProvider implements SynchronousBundleListener { // No need to sort if an action was specified. Util.sortByString(threads); - StringBuffer sb = new StringBuffer(120); + StringBuilder sb = new StringBuilder(120); System.out.println(); System.out.println(ConsoleMsg.CONSOLE_THREADGROUP_TITLE); for (int i = 0; i < threadGroups.length; i++) { diff --git a/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/Util.java b/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/Util.java index 7f30df52f..46197dc6f 100755 --- a/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/Util.java +++ b/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/Util.java @@ -196,11 +196,11 @@ public class Util { return input.substring(start, length); } - StringBuffer padding = new StringBuffer(length - size); + StringBuilder padding = new StringBuilder(length - size); for (int i = size; i < length; i++) padding.append(pad); - StringBuffer stringBuffer = new StringBuffer(length); + StringBuilder stringBuffer = new StringBuilder(length); if (onLeft) stringBuffer.append(padding.toString()); stringBuffer.append(input); diff --git a/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/telnet/TelnetCommand.java b/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/telnet/TelnetCommand.java index 887f2645e..21108747e 100755 --- a/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/telnet/TelnetCommand.java +++ b/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/telnet/TelnetCommand.java @@ -192,7 +192,7 @@ public class TelnetCommand { } private void printHelp() { - StringBuffer help = new StringBuffer(); + StringBuilder help = new StringBuilder(); help.append("telnet - start simple telnet server"); help.append("\n"); help.append("Usage: telnet start | stop [-port port] [-host host]"); diff --git a/bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/ref/Log.java b/bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/ref/Log.java index fd9065e25..0f54a8a77 100644 --- a/bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/ref/Log.java +++ b/bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/ref/Log.java @@ -627,7 +627,7 @@ public class Log implements LogInterface, ServiceTrackerCustomizer<LogService, L return prefix + " [" + moduleID + "] " + msgID + " : " + (message == null ? "" : message); } - StringBuffer sBuf = new StringBuffer(prefix).append("["); + StringBuilder sBuf = new StringBuilder(prefix).append("["); String module = getModuleName(moduleID); sBuf.append(module != null ? module : "" + moduleID); @@ -729,7 +729,7 @@ public class Log implements LogInterface, ServiceTrackerCustomizer<LogService, L if (fos == null) synchronized (this) { if (fos == null) { - StringBuffer fname = new StringBuffer(logsdir.length() + baseName.length() + 1); + StringBuilder fname = new StringBuilder(logsdir.length() + baseName.length() + 1); fname.append(logsdir).append(File.separatorChar).append(baseName); try { fos = new FileOutputStream(fname.toString(), true); |