Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2018-05-03 07:42:13 +0000
committerLars Vogel2018-05-03 07:42:13 +0000
commit39d32c5f206bd5992e6d6fa7a7ac0910a68ea8ef (patch)
tree05cded52abc93f4d13a1c5ac82e3dc0460a2b18f /org.eclipse.core.variables/src/org
parentbfd41b2fb50f1423059f8da255c25f6c4d60f3fd (diff)
downloadeclipse.platform.debug-39d32c5f206bd5992e6d6fa7a7ac0910a68ea8ef.tar.gz
eclipse.platform.debug-39d32c5f206bd5992e6d6fa7a7ac0910a68ea8ef.tar.xz
eclipse.platform.debug-39d32c5f206bd5992e6d6fa7a7ac0910a68ea8ef.zip
Using StringBuilder instead of StringBuffer in
org.eclipse.core.variables Change-Id: Ia9402af1c48a9914230a84ba076a69ab8834b742 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Diffstat (limited to 'org.eclipse.core.variables/src/org')
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringSubstitutionEngine.java12
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java2
2 files changed, 7 insertions, 7 deletions
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringSubstitutionEngine.java b/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringSubstitutionEngine.java
index bce5c5934..532eeb388 100644
--- a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringSubstitutionEngine.java
+++ b/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringSubstitutionEngine.java
@@ -40,7 +40,7 @@ public class StringSubstitutionEngine {
/**
* Resulting string
*/
- private StringBuffer fResult;
+ private StringBuilder fResult;
/**
* Whether substitutions were performed
@@ -55,10 +55,10 @@ public class StringSubstitutionEngine {
class VariableReference {
// the text inside the variable reference
- private StringBuffer fText;
+ private StringBuilder fText;
public VariableReference() {
- fText = new StringBuffer();
+ fText = new StringBuilder();
}
public void append(String text) {
@@ -95,7 +95,7 @@ public class StringSubstitutionEngine {
for (; i<resolvedVariableSets.size(); i++) {
conflictingSet.addAll(resolvedVariableSets.get(i));
}
- StringBuffer problemVariableList = new StringBuffer();
+ StringBuilder problemVariableList = new StringBuilder();
for (String string : conflictingSet) {
problemVariableList.append(string);
problemVariableList.append(", "); //$NON-NLS-1$
@@ -134,7 +134,7 @@ public class StringSubstitutionEngine {
* @exception CoreException if unable to resolve a variable
*/
private HashSet<String> substitute(String expression, boolean reportUndefinedVariables, boolean resolveVariables, IStringVariableManager manager) throws CoreException {
- fResult = new StringBuffer(expression.length());
+ fResult = new StringBuilder(expression.length());
fStack = new Stack<>();
fSubs = false;
@@ -285,7 +285,7 @@ public class StringSubstitutionEngine {
}
private String getOriginalVarText(VariableReference var) {
- StringBuffer res = new StringBuffer(var.getText());
+ StringBuilder res = new StringBuilder(var.getText());
res.insert(0, VARIABLE_START);
res.append(VARIABLE_END);
return res.toString();
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java b/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java
index 6dc72e1fb..8be6f7c3b 100644
--- a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java
+++ b/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java
@@ -572,7 +572,7 @@ public class StringVariableManager implements IStringVariableManager, IPreferenc
*/
@Override
public String generateVariableExpression(String varName, String arg) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("${"); //$NON-NLS-1$
buffer.append(varName);
if (arg != null) {

Back to the top