Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2019-06-19 10:23:32 -0400
committerLars Vogel2019-06-19 10:44:02 -0400
commit496c088f41d1da914263e5a72beb80cccf48d9dc (patch)
tree039dedfc8f3cc60f0a267c359162e5e2d5a45027
parentd18100139d2ed08f94c31ebac43e2b336a6ec294 (diff)
downloadrt.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>
-rw-r--r--bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/ReferenceHashSet.java2
-rw-r--r--bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Status.java2
-rw-r--r--bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/URIUtil.java4
-rwxr-xr-xbundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/command/adapter/CustomCommandInterpreter.java2
-rwxr-xr-xbundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/EquinoxCommandProvider.java4
-rwxr-xr-xbundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/Util.java4
-rwxr-xr-xbundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/telnet/TelnetCommand.java2
-rw-r--r--bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/ref/Log.java4
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 92b5b8a9..1f4cdb1f 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 b76a4164..fe1835a0 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 83928adb..bf2c944a 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 0df4a59e..b21f88fd 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 bbad9b24..fbb1ef01 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 7f30df52..46197dc6 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 887f2645..21108747 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 fd9065e2..0f54a8a7 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);

Back to the top