It is a synchronized entity, which we use in contexts which are limited
to a single thread. Use Deque<> for interfaces and a combination of
LinkedList implementation.
Signed-off-by: Robert Varga <rovarga@cisco.com>
Change-Id: I76956d52ee7ebb332267b0c13bb129aa9974b884
import java.util.Date;
import java.util.List;
import java.util.Map;
-import java.util.Stack;
+import java.util.Deque;
+import java.util.LinkedList;
import org.junit.Assert;
import org.junit.Before;
}
private static void checkFamilyBinding(final CompositeNode treeRoot) throws Exception {
- Stack<CompositeNode> jobQueue = new Stack<>();
+ Deque<CompositeNode> jobQueue = new LinkedList<>();
jobQueue.push(treeRoot);
while (!jobQueue.isEmpty()) {