Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Blewitt2016-04-21 17:11:13 -0400
committerGerrit Code Review @ Eclipse.org2016-04-21 18:49:32 -0400
commitccbab86d6cd5f9c6c6a2e53cd6505a95b45d6f30 (patch)
tree02575073de886a594454e26b7480127bf3f85303 /build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder
parent8a2fd3307b261c0452f3ea08235a7d898a11a7b8 (diff)
downloadorg.eclipse.cdt-ccbab86d6cd5f9c6c6a2e53cd6505a95b45d6f30.tar.gz
org.eclipse.cdt-ccbab86d6cd5f9c6c6a2e53cd6505a95b45d6f30.tar.xz
org.eclipse.cdt-ccbab86d6cd5f9c6c6a2e53cd6505a95b45d6f30.zip
Bug 492200 - Replace StringBuffer with StringBuilder
There are many opportunities for replacing `StringBuffer` with `StringBuilder` provided that the type isn't visible from the public API and is used only in internal methods. Replace these where appropriate. Change-Id: I769ceb6eaee18d183fb0e00fa0d730651f8a7edb Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
Diffstat (limited to 'build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildStepsTab.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingUI.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/FileListControlFieldEditor.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ManagedBuilderUIImages.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolChainEditTab.java4
5 files changed, 8 insertions, 8 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildStepsTab.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildStepsTab.java
index 82148bdfa3..08d0a965f0 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildStepsTab.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildStepsTab.java
@@ -300,7 +300,7 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
if(items == null)
return ""; // $NON-NLS-1$
- StringBuffer path = new StringBuffer(EMPTY_STR);
+ StringBuilder path = new StringBuilder(EMPTY_STR);
for (int i = 0; i < items.length; i++) {
path.append(items[i]);
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingUI.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingUI.java
index 48d2104885..c9a62333f2 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingUI.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingUI.java
@@ -264,7 +264,7 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
// boolean,string and enumerated
List<String> optionsList = new ArrayList<String>();
// additional options buffer
- StringBuffer addnOptions = new StringBuffer();
+ StringBuilder addnOptions = new StringBuilder();
// split all build options string
Vector<String> optionsArr = getOptionVector(alloptions);
for (String optionValue : optionsArr) {
@@ -374,7 +374,7 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
Object key = iterator.next();
String val = stringOptionsMap.get(key);
if (alloptions.indexOf(val) == -1) {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
String[] vals = val.split(WHITESPACE);
for (int t = 0; t < vals.length; t++) {
if (alloptions.indexOf(vals[t]) != -1)
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/FileListControlFieldEditor.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/FileListControlFieldEditor.java
index 9e6bae401c..5a23fc3e61 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/FileListControlFieldEditor.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/FileListControlFieldEditor.java
@@ -299,7 +299,7 @@ public class FileListControlFieldEditor extends FieldEditor {
* @return
*/
private String createList(String[] items) {
- StringBuffer path = new StringBuffer();
+ StringBuilder path = new StringBuilder();
for (int i = 0; i < items.length; i++) {
path.append(items[i]);
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ManagedBuilderUIImages.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ManagedBuilderUIImages.java
index 2b5f51219f..fb1446d9ab 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ManagedBuilderUIImages.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ManagedBuilderUIImages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2011 Rational Software Corporation and others.
+ * Copyright (c) 2002, 2016 Rational Software Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -114,7 +114,7 @@ public class ManagedBuilderUIImages {
}
private static URL makeIconFileURL(String prefix, String name) {
- StringBuffer buffer= new StringBuffer(prefix);
+ StringBuilder buffer= new StringBuilder(prefix);
buffer.append(name);
try {
return new URL(iconBaseURL, buffer.toString());
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolChainEditTab.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolChainEditTab.java
index a6242b49e8..f055869c3e 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolChainEditTab.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolChainEditTab.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 Intel Corporation and others.
+ * Copyright (c) 2007, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -605,7 +605,7 @@ public class ToolChainEditTab extends AbstractCBuildPropertyTab {
*/
public static String getCompatibilityMessage(CompatibilityStatus cs) {
IConflict[] cons = cs.getConflicts();
- StringBuffer result = new StringBuffer();
+ StringBuilder result = new StringBuilder();
for (int i=0; i<cons.length; i++) {
IBuildObject bo = cons[i].getBuildObject();
String n = (bo == null) ?

Back to the top