Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2018-04-26 13:27:36 +0000
committerLars Vogel2018-04-26 13:27:36 +0000
commit3c40ef98e902bc4cc0c9e5fed835717bc0b39f4a (patch)
treef9cdef7086dfaf1c410b8461630eb2d9a5461c6c
parent4806f8e79363be905ed889bd5e5739475a2d6a54 (diff)
downloadrt.equinox.bundles-I20180428-2020.tar.gz
rt.equinox.bundles-I20180428-2020.tar.xz
rt.equinox.bundles-I20180428-2020.zip
Reduces our Sonar warnings and is better practise Change-Id: Ide286142d496013d8878986810e80449dc7573ae Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/adapter/AdapterFactoryProxy.java2
-rw-r--r--bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/KeyedHashSet.java2
-rw-r--r--bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ReadWriteMonitor.java2
-rw-r--r--bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/RegistryCommandProvider.java4
4 files changed, 5 insertions, 5 deletions
diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/adapter/AdapterFactoryProxy.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/adapter/AdapterFactoryProxy.java
index 9fc1f9f2d..507e19bac 100644
--- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/adapter/AdapterFactoryProxy.java
+++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/adapter/AdapterFactoryProxy.java
@@ -158,7 +158,7 @@ class AdapterFactoryProxy implements IAdapterFactory, IAdapterFactoryExt {
@Override
public String toString() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append("AdapterFactoryProxy [contributor: "); //$NON-NLS-1$
sb.append(element.getContributor());
sb.append(", adaptableType: "); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/KeyedHashSet.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/KeyedHashSet.java
index ce5c0d113..01d7dff81 100644
--- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/KeyedHashSet.java
+++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/KeyedHashSet.java
@@ -299,7 +299,7 @@ public class KeyedHashSet {
@Override
public String toString() {
- StringBuffer result = new StringBuffer(100);
+ StringBuilder result = new StringBuilder(100);
result.append("{"); //$NON-NLS-1$
boolean first = true;
for (int i = 0; i < elements.length; i++) {
diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ReadWriteMonitor.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ReadWriteMonitor.java
index 03431958f..3eb539ec2 100644
--- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ReadWriteMonitor.java
+++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ReadWriteMonitor.java
@@ -89,7 +89,7 @@ public class ReadWriteMonitor {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append(this.hashCode());
if (status == 0) {
buffer.append("Monitor idle "); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/RegistryCommandProvider.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/RegistryCommandProvider.java
index 219aa1ce9..3f7a32c2f 100644
--- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/RegistryCommandProvider.java
+++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/RegistryCommandProvider.java
@@ -35,7 +35,7 @@ public class RegistryCommandProvider implements CommandProvider {
*/
private String getHelp(String commandName) {
boolean all = commandName == null;
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
if (all) {
sb.append("---Extension Registry Commands---"); //$NON-NLS-1$
sb.append(NEW_LINE);
@@ -167,7 +167,7 @@ public class RegistryCommandProvider implements CommandProvider {
}
private String spacing(CommandInterpreter ci, int level) {
- StringBuffer b = new StringBuffer();
+ StringBuilder b = new StringBuilder();
for (int i = 0; i < level; i++)
b.append(indent);
return b.toString();

Back to the top