Polish: replace the synchronized class "Stack" by an unsynchronized one such as "Deque".

This commit is contained in:
igor-suhorukov
2018-02-11 13:26:20 +03:00
committed by Juergen Hoeller
parent 3cbb2b7616
commit 711b0f50f2
8 changed files with 47 additions and 39 deletions

View File

@@ -18,7 +18,8 @@ package org.springframework.web.servlet.tags.form;
import java.io.IOException;
import java.io.Writer;
import java.util.Stack;
import java.util.ArrayDeque;
import java.util.Deque;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.PageContext;
@@ -46,7 +47,7 @@ public class TagWriter {
/**
* Stores {@link TagStateEntry tag state}. Stack model naturally supports tag nesting.
*/
private final Stack<TagStateEntry> tagState = new Stack<>();
private final Deque<TagStateEntry> tagState = new ArrayDeque<>();
/**