This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push: new 16e12cc421 Can't switch to ArrayDeque here. Needs to be LinkedList for null support 16e12cc421 is described below commit 16e12cc4212834dd85fe4fc3b3494485006d6715 Author: Mark Thomas <ma...@apache.org> AuthorDate: Thu Oct 6 12:21:43 2022 +0100 Can't switch to ArrayDeque here. Needs to be LinkedList for null support --- java/org/apache/jasper/compiler/PageInfo.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/java/org/apache/jasper/compiler/PageInfo.java b/java/org/apache/jasper/compiler/PageInfo.java index cd1b2a5b8f..eea0ef97e5 100644 --- a/java/org/apache/jasper/compiler/PageInfo.java +++ b/java/org/apache/jasper/compiler/PageInfo.java @@ -16,12 +16,12 @@ */ package org.apache.jasper.compiler; -import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Collection; import java.util.Deque; import java.util.HashMap; import java.util.HashSet; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; @@ -334,7 +334,8 @@ class PageInfo { public void pushPrefixMapping(String prefix, String uri) { Deque<String> stack = xmlPrefixMapper.get(prefix); if (stack == null) { - stack = new ArrayDeque<>(); + // Must be LinkedList as it needs to accept nulls + stack = new LinkedList<>(); xmlPrefixMapper.put(prefix, stack); } stack.addFirst(uri); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org