Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Lewis2019-10-17 18:48:34 +0000
committerGerrit Code Review @ Eclipse.org2019-10-17 18:48:34 +0000
commit89ffb1c92226e84eac5c4cee6c0dabf5655b8b3d (patch)
treee4b1d99ce9a5ebe5a3c1e20e47e83364940c197b
parent3135b975c19b87c9602d19c9a2ed6881c5c7ca6f (diff)
parent85132e9754f1f0059b55d0e8d81b1757c2f7a61d (diff)
downloadorg.eclipse.ecf-89ffb1c92226e84eac5c4cee6c0dabf5655b8b3d.tar.gz
org.eclipse.ecf-89ffb1c92226e84eac5c4cee6c0dabf5655b8b3d.tar.xz
org.eclipse.ecf-89ffb1c92226e84eac5c4cee6c0dabf5655b8b3d.zip
Merge "Use StringBuilder instead of StringBuffer where possible."
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/GUID.java2
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/LongID.java2
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/Namespace.java2
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/StringID.java2
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/LogHelper.java2
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java14
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/AbstractFileSystemBrowser.java2
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalRemoteFile.java2
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalRemoteFileAttributes.java2
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLRemoteFile.java2
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLRemoteFileAttributes.java2
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/AbstractSocketEvent.java2
12 files changed, 18 insertions, 18 deletions
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/GUID.java b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/GUID.java
index 666ea7239..560e818b2 100644
--- a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/GUID.java
+++ b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/GUID.java
@@ -154,7 +154,7 @@ public class GUID extends StringID {
}
public String toString() {
- StringBuffer sb = new StringBuffer("GUID["); //$NON-NLS-1$
+ StringBuilder sb = new StringBuilder("GUID["); //$NON-NLS-1$
sb.append(value).append("]"); //$NON-NLS-1$
return sb.toString();
}
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/LongID.java b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/LongID.java
index 52271c18e..7d899cf39 100644
--- a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/LongID.java
+++ b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/LongID.java
@@ -99,7 +99,7 @@ public class LongID extends BaseID {
}
public String toString() {
- StringBuffer sb = new StringBuffer("LongID["); //$NON-NLS-1$
+ StringBuilder sb = new StringBuilder("LongID["); //$NON-NLS-1$
sb.append(value).append("]"); //$NON-NLS-1$
return sb.toString();
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/Namespace.java b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/Namespace.java
index f13ba0e97..2d756aebe 100644
--- a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/Namespace.java
+++ b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/Namespace.java
@@ -316,7 +316,7 @@ public abstract class Namespace implements Serializable, IAdaptable {
}
public String toString() {
- StringBuffer b = new StringBuffer("Namespace["); //$NON-NLS-1$
+ StringBuilder b = new StringBuilder("Namespace["); //$NON-NLS-1$
b.append("name=").append(name).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
b.append("scheme=").append(getScheme()).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
b.append("description=").append("]"); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/StringID.java b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/StringID.java
index e5e1d8220..9cfb0a51b 100644
--- a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/StringID.java
+++ b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/StringID.java
@@ -108,7 +108,7 @@ public class StringID extends BaseID {
public String toString() {
setEmptyNamespace();
int strlen = value.length();
- StringBuffer sb = new StringBuffer(strlen + 10);
+ StringBuilder sb = new StringBuilder(strlen + 10);
sb.insert(0, "StringID[").insert(9, value).insert(strlen + 9, ']'); //$NON-NLS-1$
return sb.toString();
}
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/LogHelper.java b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/LogHelper.java
index a612db6d3..cdb3f2cac 100644
--- a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/LogHelper.java
+++ b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/LogHelper.java
@@ -42,7 +42,7 @@ public class LogHelper {
public static String getLogMessage(IStatus status) {
if (status == null)
return ""; //$NON-NLS-1$
- StringBuffer buf = new StringBuffer(status.getClass().getName() + '[');
+ StringBuilder buf = new StringBuilder(status.getClass().getName() + '[');
buf.append("plugin=").append(status.getPlugin()); //$NON-NLS-1$
buf.append(";code=").append(status.getCode()); //$NON-NLS-1$
buf.append(";message=").append(status.getMessage()); //$NON-NLS-1$
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java
index 397601788..9ec10c8af 100644
--- a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java
+++ b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java
@@ -223,7 +223,7 @@ public class Trace {
}
private static String getStringFromByteArray(byte[] bytes) {
- StringBuffer buf = new StringBuffer("["); //$NON-NLS-1$
+ StringBuilder buf = new StringBuilder("["); //$NON-NLS-1$
for (int i = 0; i < bytes.length; i++) {
buf.append(bytes[i]);
if (i == (bytes.length - 1))
@@ -245,7 +245,7 @@ public class Trace {
public static String getArgumentsString(Object[] arguments) {
if (arguments == null)
return "[]"; //$NON-NLS-1$
- StringBuffer buffer = new StringBuffer("["); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder("["); //$NON-NLS-1$
for (int i = 0; i < arguments.length; i++) {
buffer.append(getArgumentString(arguments[i]));
@@ -265,7 +265,7 @@ public class Trace {
*
*/
protected static void trace(String message) {
- StringBuffer buf = new StringBuffer(PARENTHESIS_OPEN);
+ StringBuilder buf = new StringBuilder(PARENTHESIS_OPEN);
buf.append(TRACE_STR).append(PARENTHESIS_CLOSE).append(getTimeString())
.append(message).append(SEPARATOR_SPACE);
System.out.println(buf.toString());
@@ -360,7 +360,7 @@ public class Trace {
String valueDescription, Object oldValue, Object newValue) {
if (shouldTrace(pluginId, option)) {
- StringBuffer buf = new StringBuffer(PREFIX_CHANGING);
+ StringBuilder buf = new StringBuilder(PREFIX_CHANGING);
buf.append(valueDescription).append(SEPARATOR_SPACE)
.append(LABEL_OLD_VALUE)
.append(getArgumentString(oldValue));
@@ -391,7 +391,7 @@ public class Trace {
@SuppressWarnings("rawtypes") Class clazz, String methodName,
String valueDescription, Object oldValue, Object newValue) {
if (shouldTrace(pluginId, option)) {
- StringBuffer buf = new StringBuffer(PREFIX_CHANGING);
+ StringBuilder buf = new StringBuilder(PREFIX_CHANGING);
buf.append(valueDescription).append(SEPARATOR_SPACE)
.append(LABEL_OLD_VALUE)
.append(getArgumentString(oldValue));
@@ -425,7 +425,7 @@ public class Trace {
Throwable throwable) {
if (shouldTrace(pluginId, option)) {
- StringBuffer buf = new StringBuffer(PREFIX_CATCHING);
+ StringBuilder buf = new StringBuilder(PREFIX_CATCHING);
if (throwable != null) {
String message = throwable.getMessage();
if (message != null)
@@ -463,7 +463,7 @@ public class Trace {
Throwable throwable) {
if (shouldTrace(pluginId, option)) {
- StringBuffer buf = new StringBuffer(PREFIX_THROWING);
+ StringBuilder buf = new StringBuilder(PREFIX_THROWING);
if (throwable != null) {
String message = throwable.getMessage();
if (message != null)
diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/AbstractFileSystemBrowser.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/AbstractFileSystemBrowser.java
index 9b5c7e4ce..b83293ecf 100644
--- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/AbstractFileSystemBrowser.java
+++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/AbstractFileSystemBrowser.java
@@ -180,7 +180,7 @@ public abstract class AbstractFileSystemBrowser {
}
public String toString() {
- StringBuffer buf = new StringBuffer("RemoteFileSystemBrowseEvent["); //$NON-NLS-1$
+ StringBuilder buf = new StringBuilder("RemoteFileSystemBrowseEvent["); //$NON-NLS-1$
buf.append("fileID=").append(fileID).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
List list = (remoteFiles != null) ? Arrays.asList(remoteFiles) : null;
buf.append("files=").append(list).append("]"); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalRemoteFile.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalRemoteFile.java
index e04aa8073..7f5c714bb 100644
--- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalRemoteFile.java
+++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalRemoteFile.java
@@ -106,7 +106,7 @@ public class LocalRemoteFile implements IRemoteFile {
}
public String toString() {
- StringBuffer buf = new StringBuffer("LocalRemoteFile["); //$NON-NLS-1$
+ StringBuilder buf = new StringBuilder("LocalRemoteFile["); //$NON-NLS-1$
buf.append("id=").append(getID()).append(";"); //$NON-NLS-1$//$NON-NLS-2$
buf.append("name=").append(getInfo().getName()).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
buf.append("isDir=").append(getInfo().isDirectory()).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalRemoteFileAttributes.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalRemoteFileAttributes.java
index 43346333d..948262d75 100644
--- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalRemoteFileAttributes.java
+++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalRemoteFileAttributes.java
@@ -73,7 +73,7 @@ public class LocalRemoteFileAttributes implements IRemoteFileAttributes {
* @see java.lang.Object#toString()
*/
public String toString() {
- StringBuffer buf = new StringBuffer("LocalRemoteFileAttributes["); //$NON-NLS-1$
+ StringBuilder buf = new StringBuilder("LocalRemoteFileAttributes["); //$NON-NLS-1$
for (Iterator i = getAttributeKeys(); i.hasNext();) {
String key = (String) i.next();
buf.append(key).append("=").append(getAttribute(key)); //$NON-NLS-1$
diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLRemoteFile.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLRemoteFile.java
index 715b80c4a..cb91b701e 100644
--- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLRemoteFile.java
+++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLRemoteFile.java
@@ -121,7 +121,7 @@ public class URLRemoteFile implements IRemoteFile {
* @see java.lang.Object#toString()
*/
public String toString() {
- StringBuffer buf = new StringBuffer("URLRemoteFile["); //$NON-NLS-1$
+ StringBuilder buf = new StringBuilder("URLRemoteFile["); //$NON-NLS-1$
buf.append("id=").append(getID()).append(";"); //$NON-NLS-1$//$NON-NLS-2$
buf.append("name=").append(getInfo().getName()).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
buf.append("isDir=").append(getInfo().isDirectory()).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLRemoteFileAttributes.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLRemoteFileAttributes.java
index 95741ebd2..524349c32 100644
--- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLRemoteFileAttributes.java
+++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLRemoteFileAttributes.java
@@ -63,7 +63,7 @@ public class URLRemoteFileAttributes implements IRemoteFileAttributes {
* @see java.lang.Object#toString()
*/
public String toString() {
- StringBuffer buf = new StringBuffer("URLRemoteFileAttributes["); //$NON-NLS-1$
+ StringBuilder buf = new StringBuilder("URLRemoteFileAttributes["); //$NON-NLS-1$
for (Iterator i = getAttributeKeys(); i.hasNext();) {
String key = (String) i.next();
buf.append(key).append("=").append(getAttribute(key)); //$NON-NLS-1$
diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/AbstractSocketEvent.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/AbstractSocketEvent.java
index 77bd5c73a..48f68f760 100644
--- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/AbstractSocketEvent.java
+++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/AbstractSocketEvent.java
@@ -52,7 +52,7 @@ public abstract class AbstractSocketEvent implements ISocketEvent {
}
public String toString() {
- StringBuffer sb = new StringBuffer(getEventName() + "["); //$NON-NLS-1$
+ StringBuilder sb = new StringBuilder(getEventName() + "["); //$NON-NLS-1$
sb.append("source="); //$NON-NLS-1$
sb.append(source);
sb.append(" socket="); //$NON-NLS-1$

Back to the top