Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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