Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Hammer2019-09-14 16:15:13 -0400
committerLars Vogel2019-10-02 03:02:35 -0400
commit1e75ec162f392dcfe6eb9e3cfad6dfef6ea3d1c0 (patch)
tree7797f4b792fecc271af0611301bbdf4a95257bd9
parent247d7f936fe1e34e4e862f3d75e5c8a20e328b01 (diff)
downloadrt.equinox.p2-1e75ec162f392dcfe6eb9e3cfad6dfef6ea3d1c0.tar.gz
rt.equinox.p2-1e75ec162f392dcfe6eb9e3cfad6dfef6ea3d1c0.tar.xz
rt.equinox.p2-1e75ec162f392dcfe6eb9e3cfad6dfef6ea3d1c0.zip
Use StringBuilder instead of StringBuffer where possible.
Change-Id: Ie756b6925b7dfc3471659764990c85d0e17eb1df Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherImpl.java2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java4
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java6
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ProfileChangeRequest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataParser.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/License.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointData.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormatParser.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionParser.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CoercingComparator.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/ExpressionParser.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/RequestFlexer.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/GeneratorBundleInfo.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/FeatureEntry.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAction.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AdviceFileParser.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Disassembler.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/IUDescription.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLWriter.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/DownloadStatus.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/DebugHelper.java10
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryEvent.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/MessageHelper.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/GenerateTestData.java10
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/BatchExecuteArtifactRepositoryTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/StringHelperTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/AbstractEnd2EndTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/InstallCurrentFromPrevious.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/BatchExecuteMetadataRepositoryTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/SPIMetadataRepositoryTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatDTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/PerformanceTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractReconcilerTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/AbstractSimpleConfiguratorTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/BasicResourceDelivery.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Stats.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramPropertyAction.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationWriter.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/XMLWriter.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SimpleLicenseManager.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/VersionSuffixGenerator.java2
56 files changed, 76 insertions, 76 deletions
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherImpl.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherImpl.java
index 8fe744e1e..9c239a2c3 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherImpl.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherImpl.java
@@ -24,7 +24,7 @@ import org.osgi.service.log.LogService;
public class EclipseLauncherImpl {
static String getStringOfCmd(String[] cmdarray) {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
for (int i = 0; i < cmdarray.length; i++) {
sb.append(cmdarray[i]);
sb.append(" "); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java
index 3aaee6d2e..97496a844 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java
@@ -665,7 +665,7 @@ public class EquinoxBundlesState implements BundlesState {
public String toString() {
if (state == null)
return null;
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
BundleDescription[] bundleDescriptions = state.getBundles();
for (int i = 0; i < bundleDescriptions.length; i++) {
sb.append(bundleDescriptions[i].getBundleId() + ":"); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java
index 46843c064..1f6c76714 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java
@@ -159,8 +159,8 @@ public class EquinoxFwConfigFileParser {
}
private void writeBundlesList(File fwJar, Properties props, BundleInfo[] bundles) {
- StringBuffer osgiBundlesList = new StringBuffer();
- StringBuffer osgiFrameworkExtensionsList = new StringBuffer();
+ StringBuilder osgiBundlesList = new StringBuilder();
+ StringBuilder osgiFrameworkExtensionsList = new StringBuilder();
for (int j = 0; j < bundles.length; j++) {
BundleInfo bundle = bundles[j];
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java
index 01e4d6a83..d570bdf8f 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java
@@ -537,7 +537,7 @@ public class EquinoxManipulatorImpl implements Manipulator {
@Override
public String toString() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append("++++++++++++++++++++++++++++++++++++++++++\n" + "Class:" + this.getClass().getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
sb.append("------------- LauncherData -----------\n"); //$NON-NLS-1$
sb.append(launcherData.toString());
@@ -606,7 +606,7 @@ public class EquinoxManipulatorImpl implements Manipulator {
}
public static String makeArrayRelative(String array, URL rootURL) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
for (StringTokenizer tokenizer = new StringTokenizer(array, COMMA); tokenizer.hasMoreTokens();) {
String token = tokenizer.nextToken();
String absolute = makeRelative(token, rootURL);
@@ -618,7 +618,7 @@ public class EquinoxManipulatorImpl implements Manipulator {
}
public static String makeArrayAbsolute(String array, URL rootURL) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
for (StringTokenizer tokenizer = new StringTokenizer(array, COMMA); tokenizer.hasMoreTokens();) {
String token = tokenizer.nextToken();
String absolute = makeAbsolute(token, rootURL);
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java
index ece7e5848..8ccaf3439 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java
@@ -221,7 +221,7 @@ public class LauncherData {
@Override
public String toString() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append("Class:" + this.getClass().getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
sb.append("fwName=" + this.fwName + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
sb.append("fwVersion=" + this.fwVersion + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java b/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java
index b09f2dfb3..bd7ed06cb 100644
--- a/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java
+++ b/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java
@@ -197,7 +197,7 @@ public class ProvCommandProvider implements CommandProvider {
}
private String flattenStatus(IStatus[] childs, String indent) {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
for (int i = 0; (childs != null) && (i < childs.length); i++) {
sb.append(indent).append(childs[i].getMessage()).append(NEW_LINE);
diff --git a/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java b/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java
index 31a4db978..4074db2fe 100644
--- a/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java
+++ b/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java
@@ -191,7 +191,7 @@ public class ProvisioningHelper {
return null;
IQueryResult<IInstallableUnit> units = getInstallableUnits(agent, (URI) null, QueryUtil.createIUQuery(unitId, Version.create(version)), progress);
if (units.isEmpty()) {
- StringBuffer error = new StringBuffer();
+ StringBuilder error = new StringBuilder();
error.append("Installable unit not found: " + unitId + ' ' + version + '\n'); //$NON-NLS-1$
error.append("Repositories searched:\n");//$NON-NLS-1$
URI[] repos = getMetadataRepositories(agent);
@@ -290,7 +290,7 @@ public class ProvisioningHelper {
return null;
IQueryResult<IInstallableUnit> units = profile.query(QueryUtil.createIUQuery(unitId, Version.create(version)), progress);
if (units.isEmpty()) {
- StringBuffer error = new StringBuffer();
+ StringBuilder error = new StringBuilder();
error.append("Installable unit not found: " + unitId + ' ' + version + '\n'); //$NON-NLS-1$
error.append("Repositories searched:\n"); //$NON-NLS-1$
URI[] repos = getMetadataRepositories(agent);
diff --git a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java
index 8cc5917ed..570a19e75 100644
--- a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java
+++ b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java
@@ -1204,7 +1204,7 @@ public class DirectorApplication implements IApplication, ProvisioningListener {
}
private String toString(Map<String, String> context) {
- StringBuffer result = new StringBuffer();
+ StringBuilder result = new StringBuilder();
for (Map.Entry<String, String> entry : context.entrySet()) {
if (result.length() > 0)
result.append(',');
diff --git a/bundles/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java b/bundles/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java
index 532242810..71d662416 100644
--- a/bundles/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java
+++ b/bundles/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java
@@ -142,7 +142,7 @@ public class DirectorTask extends Task implements ILog {
}
if (ius.size() > 0) {
result.add("-installIUs"); //$NON-NLS-1$
- StringBuffer arg = new StringBuffer();
+ StringBuilder arg = new StringBuilder();
for (Iterator<IUDescription> iterator = ius.iterator(); iterator.hasNext();) {
IUDescription object = iterator.next();
arg.append(object.getVersionedId().toString());
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ProfileChangeRequest.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ProfileChangeRequest.java
index 3bf49a105..8b4c33b22 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ProfileChangeRequest.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ProfileChangeRequest.java
@@ -222,7 +222,7 @@ public class ProfileChangeRequest implements Cloneable, IProfileChangeRequest {
@Override
public String toString() {
- StringBuffer result = new StringBuffer(1000);
+ StringBuilder result = new StringBuilder(1000);
result.append("==Profile change request for "); //$NON-NLS-1$
result.append(profile.getProfileId());
result.append('\n');
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java
index de66b270e..57cf73fa3 100644
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java
+++ b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java
@@ -218,7 +218,7 @@ public class Utils {
}
public static String concat(String[] array) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
for (int i = 0; i < array.length; i++) {
if (i > 0)
buffer.append(' ');
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataParser.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataParser.java
index 960214445..b1fb03570 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataParser.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataParser.java
@@ -813,7 +813,7 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
private String removeWhiteSpace(String s) {
if (s == null)
return ""; //$NON-NLS-1$
- StringBuffer builder = new StringBuffer();
+ StringBuilder builder = new StringBuilder();
for (int i = 0; i < s.length(); i++) {
if (s.charAt(i) != ' ')
builder.append(s.charAt(i));
@@ -890,7 +890,7 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
private String removeWhiteSpace(String s) {
if (s == null)
return ""; //$NON-NLS-1$
- StringBuffer builder = new StringBuffer();
+ StringBuilder builder = new StringBuilder();
for (int i = 0; i < s.length(); i++) {
if (s.charAt(i) != ' ')
builder.append(s.charAt(i));
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/License.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/License.java
index 3c3e1dfdf..fc58e3e78 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/License.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/License.java
@@ -131,7 +131,7 @@ public class License implements ILicense {
*/
private String normalize(String license) {
String text = license.trim();
- StringBuffer result = new StringBuffer();
+ StringBuilder result = new StringBuilder();
int length = text.length();
for (int i = 0; i < length; i++) {
char c = text.charAt(i);
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointData.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointData.java
index 05f2ddb0e..1ff968aeb 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointData.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointData.java
@@ -90,7 +90,7 @@ public class TouchpointData implements ITouchpointData {
*/
@Override
public String toString() {
- StringBuffer result = new StringBuffer();
+ StringBuilder result = new StringBuilder();
for (Entry<String, ITouchpointInstruction> instruction : instructions.entrySet()) {
result.append(instruction.getKey()).append(" -> ").append(instruction.getValue()).append('\n'); //$NON-NLS-1$
}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormatParser.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormatParser.java
index 87b7485e5..1c1079e1c 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormatParser.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormatParser.java
@@ -1240,7 +1240,7 @@ class VersionFormatParser {
}
private String parseAndConsiderEscapeUntil(char endChar) throws VersionFormatException {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
while (current < eos) {
char c = format.charAt(current++);
if (c == endChar)
@@ -1288,7 +1288,7 @@ class VersionFormatParser {
private void parseCharacterGroup(VersionFormatParser.Instructions ep) throws VersionFormatException {
assertChar('[');
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
outer: for (; current < eos; ++current) {
char c = format.charAt(current);
switch (c) {
@@ -1355,7 +1355,7 @@ class VersionFormatParser {
++current;
ArrayList<List<String>> identifiers = new ArrayList<>();
ArrayList<String> idents = new ArrayList<>();
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
for (;;) {
if (current >= eos)
throw formatException(Messages.bad_enum_definition);
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionParser.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionParser.java
index 4ecc7e3f7..0a76d24ad 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionParser.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionParser.java
@@ -231,7 +231,7 @@ public abstract class VersionParser {
switch (c) {
case '\'' :
case '"' : {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
for (;;) {
char q = c;
if (++current == maxPos)
@@ -370,7 +370,7 @@ public abstract class VersionParser {
int pos = position[0];
ArrayList<List<String>> identifiers = new ArrayList<>();
int ordinal = -1;
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
for (;;) {
if (pos >= maxPos)
return null;
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CoercingComparator.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CoercingComparator.java
index 822df547e..cbfd94932 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CoercingComparator.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CoercingComparator.java
@@ -370,7 +370,7 @@ public abstract class CoercingComparator<T> {
}
protected IllegalArgumentException uncoercable(Object v) {
- StringBuffer sb = new StringBuffer("Cannot coerce "); //$NON-NLS-1$
+ StringBuilder sb = new StringBuilder("Cannot coerce "); //$NON-NLS-1$
if (v instanceof String) {
sb.append('\'');
sb.append(v);
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/ExpressionParser.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/ExpressionParser.java
index 057065de7..6c08f2a06 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/ExpressionParser.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/ExpressionParser.java
@@ -610,7 +610,7 @@ public class ExpressionParser extends Stack<IExpression> implements IExpressionC
private void parseDelimitedString(char delim) {
int start = ++tokenPos;
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
int top = expression.length();
while (tokenPos < top) {
char ec = expression.charAt(tokenPos);
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/RequestFlexer.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/RequestFlexer.java
index 631c6a4b6..6145cdb81 100644
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/RequestFlexer.java
+++ b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/RequestFlexer.java
@@ -330,7 +330,7 @@ public class RequestFlexer {
//Create an OR expression that is matching all the entries from the given collection
private IRequirement createORRequirement(Collection<IInstallableUnit> findUpdates, boolean optional) {
- StringBuffer expression = new StringBuffer();
+ StringBuilder expression = new StringBuilder();
Object[] expressionParameters = new Object[findUpdates.size() * 2];
int count = 0;
for (IInstallableUnit iu : findUpdates) {
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java
index 8ede389c3..58e023c07 100644
--- a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java
@@ -527,7 +527,7 @@ public class BrandingIron {
if (version != null) {
// CFBundleShortVersionString is to be 3 segments only
// http://developer.apple.com/library/mac/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-111349
- StringBuffer sv = new StringBuffer(version.getSegmentCount() > 0 ? version.getSegment(0).toString() : "0"); //$NON-NLS-1$
+ StringBuilder sv = new StringBuilder(version.getSegmentCount() > 0 ? version.getSegment(0).toString() : "0"); //$NON-NLS-1$
sv.append('.');
sv.append(version.getSegmentCount() > 1 ? version.getSegment(1).toString() : "0"); //$NON-NLS-1$
sv.append('.');
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/GeneratorBundleInfo.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/GeneratorBundleInfo.java
index 9dfc4da4e..19b964b75 100644
--- a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/GeneratorBundleInfo.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/GeneratorBundleInfo.java
@@ -62,7 +62,7 @@ public class GeneratorBundleInfo extends BundleInfo {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
String superSt = super.toString();
if (superSt.length() > 0)
buffer.append(superSt.substring(0, superSt.length() - 1));
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java
index cd201853b..bd896cc7a 100644
--- a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java
@@ -213,7 +213,7 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
if (text == null || text.trim().length() == 0)
return ""; //$NON-NLS-1$
- StringBuffer result = new StringBuffer(text.length());
+ StringBuilder result = new StringBuilder(text.length());
boolean haveSpace = false;
for (int i = 0; i < text.length(); i++) {
char c = text.charAt(i);
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java
index 31b594958..cdb52b9d2 100644
--- a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java
@@ -525,7 +525,7 @@ public class BundlesAction extends AbstractPublisherAction {
private static String toManifestString(Map<String, String> p) {
if (p == null)
return null;
- StringBuffer result = new StringBuffer();
+ StringBuilder result = new StringBuilder();
// See https://bugs.eclipse.org/329386. We are trying to reduce the size of the manifest data in
// the eclipse touchpoint. We've removed the code that requires it but in order for old clients
// to still be able to use recent repositories, we're going to keep around the manifest properties
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/FeatureEntry.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/FeatureEntry.java
index 8d2dfb9c0..d69db4b8a 100644
--- a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/FeatureEntry.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/FeatureEntry.java
@@ -209,7 +209,7 @@ public class FeatureEntry implements IPlatformEntry {
@Override
public String toString() {
- StringBuffer result = new StringBuffer();
+ StringBuilder result = new StringBuilder();
result.append(isRequires ? "Requires: " : ""); //$NON-NLS-1$ //$NON-NLS-2$
result.append(isPlugin ? "Plugin: " : "Feature: "); //$NON-NLS-1$ //$NON-NLS-2$
result.append(id != null ? id.toString() : ""); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAction.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAction.java
index 03b6cf2e1..1cfd148d7 100644
--- a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAction.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAction.java
@@ -633,7 +633,7 @@ public class FeaturesAction extends AbstractPublisherAction {
private void setupLinks(InstallableUnitDescription iu, FileSetDescriptor descriptor) {
String[] links = getArrayFromString(descriptor.getLinks(), ","); //$NON-NLS-1$
- StringBuffer linkActions = new StringBuffer();
+ StringBuilder linkActions = new StringBuilder();
int i = 0;
while (i < links.length) {
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AdviceFileParser.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AdviceFileParser.java
index 48d80a6ef..0fe334ddb 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AdviceFileParser.java
+++ b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AdviceFileParser.java
@@ -626,7 +626,7 @@ public class AdviceFileParser {
public static String replace(String source, String from, String to) {
if (from.length() == 0)
return source;
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
int current = 0;
int pos = 0;
while (pos != -1) {
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java
index 9c073c688..c008736f3 100644
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java
+++ b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java
@@ -336,7 +336,7 @@ public class DropinsRepositoryListener extends RepositoryListener {
}
private void setListRepositoryProperty(IRepository<?> repository, String key, List<String> listProperty) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
for (Iterator<String> it = listProperty.iterator(); it.hasNext();) {
String repositoryString = it.next();
buffer.append(repositoryString);
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java
index f0bf37762..b3a0bb604 100644
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java
+++ b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java
@@ -45,7 +45,7 @@ public class PlatformXmlListener extends DirectoryChangeListener {
private Set<IMetadataRepository> configRepositories;
private String toString(Feature[] features, String[] list) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
if (features != null) {
for (int i = 0; i < features.length; i++) {
String featureURL = features[i].getUrl();
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
index f44848dd2..93064cd4e 100644
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
+++ b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
@@ -437,7 +437,7 @@ public class ProfileSynchronizer {
private String synchronizeCacheExtensions() {
List<String> currentExtensions = new ArrayList<>();
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
List<String> repositories = new ArrayList<>(repositoryMap.keySet());
URL installArea = Activator.getOSGiInstallArea();
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Disassembler.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Disassembler.java
index a2a33ec45..6bcc5e3f7 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Disassembler.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Disassembler.java
@@ -128,7 +128,7 @@ public class Disassembler {
}
public static String escapeString(String s) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
for (int i = 0, max = s.length(); i < max; i++) {
char c = s.charAt(i);
switch (c) {
@@ -179,7 +179,7 @@ public class Disassembler {
}
static String decodeStringValue(char[] chars) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
for (int i = 0, max = chars.length; i < max; i++) {
char c = chars[i];
switch (c) {
@@ -830,11 +830,11 @@ public class Disassembler {
final char[] innerName2 = o2.getInnerName();
final char[] outerClassName1 = o1.getOuterClassName();
final char[] outerClassName2 = o2.getOuterClassName();
- StringBuffer buffer1 = new StringBuffer();
+ StringBuilder buffer1 = new StringBuilder();
buffer1.append(innerClassName1 == null ? EMPTY_CHAR_ARRAY : innerClassName1);
buffer1.append(innerName1 == null ? EMPTY_CHAR_ARRAY : innerName1);
buffer1.append(outerClassName1 == null ? EMPTY_CHAR_ARRAY : outerClassName1);
- StringBuffer buffer2 = new StringBuffer();
+ StringBuilder buffer2 = new StringBuilder();
buffer2.append(innerClassName2 == null ? EMPTY_CHAR_ARRAY : innerClassName2);
buffer2.append(innerName2 == null ? EMPTY_CHAR_ARRAY : innerName2);
buffer2.append(outerClassName2 == null ? EMPTY_CHAR_ARRAY : outerClassName2);
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/IUDescription.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/IUDescription.java
index 1c9db47ff..d5112fd18 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/IUDescription.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/IUDescription.java
@@ -89,7 +89,7 @@ public class IUDescription extends DataType {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer("Installable Unit ["); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder("Installable Unit ["); //$NON-NLS-1$
if (id != null) {
buffer.append(" id="); //$NON-NLS-1$
buffer.append(id);
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLWriter.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLWriter.java
index 31bf8a3e8..79e96f5d2 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLWriter.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLWriter.java
@@ -45,7 +45,7 @@ public class XMLWriter implements XMLConstants {
@Override
public String toString() {
- StringBuffer sb = new StringBuffer("<?"); //$NON-NLS-1$
+ StringBuilder sb = new StringBuilder("<?"); //$NON-NLS-1$
sb.append(this.target).append(' ');
for (int i = 0; i < data.length; i++) {
sb.append(this.data[i]);
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/DownloadStatus.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/DownloadStatus.java
index 28f571121..5db10e8d0 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/DownloadStatus.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/DownloadStatus.java
@@ -80,7 +80,7 @@ public class DownloadStatus extends Status {
@Override
public String toString() {
- StringBuffer sb = new StringBuffer(super.toString());
+ StringBuilder sb = new StringBuilder(super.toString());
sb.append(' ');
sb.append("LastModified="); //$NON-NLS-1$
sb.append(getLastModified());
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/DebugHelper.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/DebugHelper.java
index 702ca8660..3cef71ce3 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/DebugHelper.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/DebugHelper.java
@@ -38,7 +38,7 @@ public class DebugHelper {
}
public static void debug(String name, String message) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("["); //$NON-NLS-1$
buffer.append(Activator.ID + "-" + name); //$NON-NLS-1$
buffer.append("] "); //$NON-NLS-1$
@@ -57,13 +57,13 @@ public class DebugHelper {
Map<Object, Object> params = new LinkedHashMap<>(keyValueArray.length / 2);
for (int i = 0; i < keyValueArray.length; i += 2)
params.put(keyValueArray[i], keyValueArray[i + 1]);
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append(message);
buffer.append(formatMap(params, true, true));
debug(name, buffer.toString());
}
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("["); //$NON-NLS-1$
buffer.append(Activator.ID + "-" + name); //$NON-NLS-1$
buffer.append("] "); //$NON-NLS-1$
@@ -79,7 +79,7 @@ public class DebugHelper {
if (array == null || array.length == 0)
return "[]"; //$NON-NLS-1$
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append('[');
int i = 0;
for (;;) {
@@ -104,7 +104,7 @@ public class DebugHelper {
if (map == null || map.size() == 0)
return "[]"; //$NON-NLS-1$
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append('[');
for (Entry<?, ?> e : map.entrySet()) {
buffer.append(e.getKey());
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryEvent.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryEvent.java
index 1bd45ef28..930a127b7 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryEvent.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryEvent.java
@@ -154,7 +154,7 @@ public class RepositoryEvent extends EventObject {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("RepositoryEvent["); //$NON-NLS-1$
switch (kind) {
case ADDED :
diff --git a/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/MessageHelper.java b/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/MessageHelper.java
index ecf54010d..2dfbb47b4 100644
--- a/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/MessageHelper.java
+++ b/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/MessageHelper.java
@@ -50,7 +50,7 @@ public class MessageHelper {
* Pre-pend the message with the current date and the name of the current thread.
*/
public static void debug(String message) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append(new Date(System.currentTimeMillis()));
buffer.append(" - ["); //$NON-NLS-1$
buffer.append(Thread.currentThread().getName());
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/GenerateTestData.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/GenerateTestData.java
index 5e0e182ba..edf894e57 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/GenerateTestData.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/GenerateTestData.java
@@ -71,7 +71,7 @@ public class GenerateTestData {
@Override
String getManifest() {
- StringBuffer manifest = new StringBuffer();
+ StringBuilder manifest = new StringBuilder();
manifest.append("Manifest-Version: 1.0\n");
manifest.append("Bundle-RequiredExecutionEnvironment: J2SE-1.4\n");
manifest.append("Bundle-ManifestVersion: 2\n");
@@ -79,7 +79,7 @@ public class GenerateTestData {
manifest.append("Bundle-SymbolicName: " + id + '\n');
manifest.append("Bundle-Version: " + version + '\n');
if (!requires.isEmpty()) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("Require-Bundle: ");
for (Iterator<TestObject> iter = requires.iterator(); iter.hasNext();) {
TestObject req = iter.next();
@@ -98,7 +98,7 @@ public class GenerateTestData {
@Override
String getManifest() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
buffer.append(" <feature\n");
buffer.append("\t\tid=\"" + id + "\"\n");
@@ -137,7 +137,7 @@ public class GenerateTestData {
}
static void printUsage() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("\nUse this application to generate test feature and bundle data.\n");
buffer.append("Parameters:\n");
buffer.append("-output <location>\n");
@@ -154,7 +154,7 @@ public class GenerateTestData {
* Verify setup before starting. Ensure all required parameters have been set.
*/
static boolean validate() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
if (outputFile == null)
buffer.append("Need to set an output directory.\n");
if (numFeatures < 0 || numBundles <= 0)
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/BatchExecuteArtifactRepositoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/BatchExecuteArtifactRepositoryTest.java
index 20b73d396..e1b9f6661 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/BatchExecuteArtifactRepositoryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/BatchExecuteArtifactRepositoryTest.java
@@ -181,7 +181,7 @@ public class BatchExecuteArtifactRepositoryTest extends AbstractProvisioningTest
}
boolean fileContainsString(URI location, String string) throws IOException {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
try (BufferedReader reader = new BufferedReader(new FileReader(new File(location)))) {
while (reader.ready())
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/StringHelperTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/StringHelperTest.java
index 0b366afff..2b876b4eb 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/StringHelperTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/StringHelperTest.java
@@ -40,7 +40,7 @@ public class StringHelperTest extends TestCase {
public void testPerformance() throws Exception {
String[] strings = new String[5];
- StringBuffer inputBld = new StringBuffer();
+ StringBuilder inputBld = new StringBuilder();
for (int idx = 0; idx < 5; ++idx) {
if (idx > 0)
inputBld.append(',');
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/AbstractEnd2EndTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/AbstractEnd2EndTest.java
index a664baebf..f839fe839 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/AbstractEnd2EndTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/AbstractEnd2EndTest.java
@@ -295,7 +295,7 @@ public abstract class AbstractEnd2EndTest extends AbstractProvisioningTest {
IPath path = new Path(name);
if ("app".equals(path.getFileExtension())) //$NON-NLS-1$
return name;
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append(name.substring(0, 1).toUpperCase());
buffer.append(name.substring(1));
buffer.append(".app/Contents/MacOS/"); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/InstallCurrentFromPrevious.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/InstallCurrentFromPrevious.java
index 2662291b9..b7de194bc 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/InstallCurrentFromPrevious.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/InstallCurrentFromPrevious.java
@@ -43,7 +43,7 @@ public class InstallCurrentFromPrevious extends AbstractReconcilerTest {
if (result != 0) {
File logFile = new File(installFolder, "log.log");
if (logFile.exists()) {
- StringBuffer fileContents = new StringBuffer();
+ StringBuilder fileContents = new StringBuilder();
try (BufferedReader reader = new BufferedReader(new FileReader(logFile))) {
while (reader.ready())
fileContents.append(reader.readLine());
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/BatchExecuteMetadataRepositoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/BatchExecuteMetadataRepositoryTest.java
index 0be6999c9..a562870a5 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/BatchExecuteMetadataRepositoryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/BatchExecuteMetadataRepositoryTest.java
@@ -44,7 +44,7 @@ public class BatchExecuteMetadataRepositoryTest extends AbstractProvisioningTest
}
boolean fileContainsString(URI location, String string) throws IOException {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
try (BufferedReader reader = new BufferedReader(new FileReader(new File(location)));) {
while (reader.ready())
buffer.append(reader.readLine());
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/SPIMetadataRepositoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/SPIMetadataRepositoryTest.java
index 682e30f1b..6d8e9dfc2 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/SPIMetadataRepositoryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/SPIMetadataRepositoryTest.java
@@ -669,7 +669,7 @@ public class SPIMetadataRepositoryTest extends AbstractProvisioningTest {
private String normalize(String license) {
String text = license.trim();
- StringBuffer result = new StringBuffer();
+ StringBuilder result = new StringBuilder();
int length = text.length();
for (int i = 0; i < length; i++) {
char c = text.charAt(i);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatDTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatDTest.java
index 52eef6a02..201170e6a 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatDTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatDTest.java
@@ -65,7 +65,7 @@ public class FormatDTest extends TestCase {
Integer one = Integer.valueOf(1);
Integer two = Integer.valueOf(2);
for (int i = 0; i < s_delim.length; i++) {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append(formatString);
buf.append("1");
buf.append(s_delim[i]);
@@ -83,7 +83,7 @@ public class FormatDTest extends TestCase {
String one = "abc";
String two = "def";
for (int i = 0; i < s_delim.length; i++) {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append(formatString);
buf.append(one);
buf.append(s_delim[i]);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/PerformanceTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/PerformanceTest.java
index 176724e48..5b5dc265a 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/PerformanceTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/PerformanceTest.java
@@ -228,7 +228,7 @@ public class PerformanceTest extends TestCase {
*/
private static String[] createStrings() {
String[] strings = new String[MUL * MUL * MUL];
- StringBuffer buf = new StringBuffer(100);
+ StringBuilder buf = new StringBuilder(100);
int x = 0;
for (int i = 0; i < MUL; i++)
for (int j = 0; j < MUL; j++)
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractReconcilerTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractReconcilerTest.java
index ff4efb5a3..89e05bacf 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractReconcilerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractReconcilerTest.java
@@ -654,7 +654,7 @@ public class AbstractReconcilerTest extends AbstractProvisioningTest {
File file = new File(path);
if (!file.exists())
return null;
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
for (String line = reader.readLine(); line != null; line = reader.readLine()) {
buffer.append(line);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/AbstractSimpleConfiguratorTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/AbstractSimpleConfiguratorTest.java
index da868174c..4debb8c51 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/AbstractSimpleConfiguratorTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/AbstractSimpleConfiguratorTest.java
@@ -97,7 +97,7 @@ public abstract class AbstractSimpleConfiguratorTest extends AbstractProvisionin
frameworkProperties.put("osgi.framework", null);
frameworkProperties.put("osgi.install.area", installarea.toURL().toExternalForm());
frameworkProperties.put("osgi.configuration.area", configarea.toURL().toExternalForm());
- StringBuffer osgiBundles = new StringBuffer();
+ StringBuilder osgiBundles = new StringBuilder();
for (int i = 0; additionalBundle != null && i < additionalBundle.length; i++) {
osgiBundles.append("reference:").append(additionalBundle[i].toURL().toExternalForm()).append(",");
}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/BasicResourceDelivery.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/BasicResourceDelivery.java
index f6baef733..59bfb187d 100644
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/BasicResourceDelivery.java
+++ b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/BasicResourceDelivery.java
@@ -282,7 +282,7 @@ public class BasicResourceDelivery extends HttpServlet {
}
} else /* path != "/" */
{
- StringBuffer buf = new StringBuffer(aliaslen + pathlen);
+ StringBuilder buf = new StringBuilder(aliaslen + pathlen);
buf.append(path.getPath());
if (aliaslen == 1) /* alias == "/" */
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Stats.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Stats.java
index b849543e9..7020c6f88 100644
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Stats.java
+++ b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Stats.java
@@ -73,7 +73,7 @@ public class Stats extends HttpServlet {
}
private String getStatsResult() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append(
"It's a page to count the downloading times when heading this page with query 'package=<package name>'.\n"); //$NON-NLS-1$
for (String string : downloadStats.keySet()) {
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramPropertyAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramPropertyAction.java
index dc628f87b..99fb56d3b 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramPropertyAction.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramPropertyAction.java
@@ -36,7 +36,7 @@ public class AddProgramPropertyAction extends ProvisioningAction {
// convert the given list to a comma-separated string
protected static String convertToString(List<String> list) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
for (Iterator<String> iter = list.iterator(); iter.hasNext();) {
buffer.append(iter.next());
if (iter.hasNext())
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationWriter.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationWriter.java
index b7a6aa7ea..0b19c573f 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationWriter.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationWriter.java
@@ -132,7 +132,7 @@ public class ConfigurationWriter implements ConfigurationConstants {
private static String toString(Object[] list) {
if (list == null || list.length == 0)
return null;
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
for (int i = 0; i < list.length; i++) {
buffer.append(list[i].toString());
if (i + 1 < list.length)
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/XMLWriter.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/XMLWriter.java
index 0ded2d592..905bc86c5 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/XMLWriter.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/XMLWriter.java
@@ -57,7 +57,7 @@ public class XMLWriter extends PrintWriter {
}
public void printTag(String name, Map<String, String> parameters, boolean shouldTab, boolean newLine) {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append("<"); //$NON-NLS-1$
sb.append(name);
if (parameters != null)
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java
index da1ec5653..62d4470c1 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java
@@ -229,7 +229,7 @@ public class IUImplementationGroup extends IUGroup {
}
void copySelectionsToClipboard(List list) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
String[] selections = list.getSelection();
for (String selection : selections) {
buffer.append(selection);
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SimpleLicenseManager.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SimpleLicenseManager.java
index fae10a27d..160fdf055 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SimpleLicenseManager.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SimpleLicenseManager.java
@@ -88,7 +88,7 @@ public class SimpleLicenseManager extends LicenseManager {
private void updatePreferences() {
Preferences pref = getPreferences();
- StringBuffer result = new StringBuffer();
+ StringBuilder result = new StringBuilder();
Object[] indexedList = accepted.toArray();
for (int i = 0; i < indexedList.length; i++) {
if (i != 0)
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java
index c1a72eb88..663ba4520 100644
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java
+++ b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java
@@ -444,7 +444,7 @@ public class SiteFeature {
*/
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
if (featureId != null)
buffer.append(featureId).append(' ');
if (featureVersion != null)
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/VersionSuffixGenerator.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/VersionSuffixGenerator.java
index 17b678298..9c13469c4 100644
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/VersionSuffixGenerator.java
+++ b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/VersionSuffixGenerator.java
@@ -145,7 +145,7 @@ public class VersionSuffixGenerator {
break;
}
}
- StringBuffer result = new StringBuffer(length + 1);
+ StringBuilder result = new StringBuilder(length + 1);
result.append(base64Character((length << 3) + (int) ((number >> (6 * length)) & 0x7)));
while (--length >= 0) {
result.append(base64Character((int) ((number >> (6 * length)) & 0x3f)));

Back to the top