diff options
author | Lars Vogel | 2020-01-17 17:46:51 +0000 |
---|---|---|
committer | Lars Vogel | 2020-01-20 11:01:46 +0000 |
commit | 87f808ddd42862847c75bd5374658ca3618e8127 (patch) | |
tree | 47f41b6db8d9c67b2be21fda586c7766e378cbaf | |
parent | 56b70f88f9ebd00cbfe86d934a053a07ef3d7a9c (diff) | |
download | eclipse.platform.debug-87f808ddd42862847c75bd5374658ca3618e8127.tar.gz eclipse.platform.debug-87f808ddd42862847c75bd5374658ca3618e8127.tar.xz eclipse.platform.debug-87f808ddd42862847c75bd5374658ca3618e8127.zip |
Use ArrayDeque in StringSubstitutionEngine instead of Stack
Change-Id: I65b227abde82a39cde30834960344c9930663d20
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r-- | org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringSubstitutionEngine.java | 7 |
1 files changed, 4 insertions, 3 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 774c50d69..55ac7c851 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 @@ -13,10 +13,11 @@ *******************************************************************************/ package org.eclipse.core.internal.variables; +import java.util.ArrayDeque; import java.util.ArrayList; +import java.util.Deque; import java.util.HashSet; import java.util.List; -import java.util.Stack; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IStatus; @@ -53,7 +54,7 @@ public class StringSubstitutionEngine { /** * Stack of variables to resolve */ - private Stack<VariableReference> fStack; + private Deque<VariableReference> fStack; class VariableReference { @@ -138,7 +139,7 @@ public class StringSubstitutionEngine { */ private HashSet<String> substitute(String expression, boolean reportUndefinedVariables, boolean resolveVariables, IStringVariableManager manager) throws CoreException { fResult = new StringBuilder(expression.length()); - fStack = new Stack<>(); + fStack = new ArrayDeque<>(); fSubs = false; HashSet<String> resolvedVariables = new HashSet<>(); |