You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2022/10/06 13:16:42 UTC
[tomcat] branch main updated (148f6e436b -> 4b0392eec3)
This is an automated email from the ASF dual-hosted git repository.
markt pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
from 148f6e436b Update after switch to StringUtils
new 5daaee5df3 Refactor LinkedList to Deque and ArrayDeque
new 18fea82fe3 Switch Deque implementations from LinkedList to ArrayDeque
new 4b0392eec3 Add implementation comment
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
java/jakarta/el/ELContext.java | 4 ++--
java/org/apache/catalina/filters/RemoteIpFilter.java | 4 +++-
java/org/apache/catalina/ssi/ExpressionParseTree.java | 4 ++--
3 files changed, 7 insertions(+), 5 deletions(-)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[tomcat] 03/03: Add implementation comment
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 4b0392eec304a181332931c590feb75fb77ea39b
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Oct 6 14:02:45 2022 +0100
Add implementation comment
---
java/org/apache/catalina/ssi/ExpressionParseTree.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/catalina/ssi/ExpressionParseTree.java b/java/org/apache/catalina/ssi/ExpressionParseTree.java
index a6b7afc9e7..c6bb29ffa6 100644
--- a/java/org/apache/catalina/ssi/ExpressionParseTree.java
+++ b/java/org/apache/catalina/ssi/ExpressionParseTree.java
@@ -35,12 +35,12 @@ public class ExpressionParseTree {
private static final StringManager sm = StringManager.getManager(ExpressionParseTree.class);
/**
* Contains the current set of completed nodes. This is a workspace for the
- * parser.
+ * parser. Needs to be LinkedList since it can contain {@code null}s.
*/
private final LinkedList<Node> nodeStack = new LinkedList<>();
/**
* Contains operator nodes that don't yet have values. This is a workspace
- * for the parser.
+ * for the parser. Needs to be LinkedList since it can contain {@code null}s.
*/
private final LinkedList<OppNode> oppStack = new LinkedList<>();
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[tomcat] 01/03: Refactor LinkedList to Deque and ArrayDeque
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 5daaee5df36770d38648be4cbf12606920efd5ea
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Oct 6 13:51:48 2022 +0100
Refactor LinkedList to Deque and ArrayDeque
---
java/org/apache/catalina/filters/RemoteIpFilter.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/catalina/filters/RemoteIpFilter.java b/java/org/apache/catalina/filters/RemoteIpFilter.java
index fcf6e25fa5..6a4570800d 100644
--- a/java/org/apache/catalina/filters/RemoteIpFilter.java
+++ b/java/org/apache/catalina/filters/RemoteIpFilter.java
@@ -20,7 +20,9 @@ import java.io.IOException;
import java.io.ObjectInputStream;
import java.net.InetAddress;
import java.net.UnknownHostException;
+import java.util.ArrayDeque;
import java.util.Collections;
+import java.util.Deque;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
@@ -798,7 +800,7 @@ public class RemoteIpFilter extends GenericFilter {
if (isInternal || (trustedProxies != null &&
trustedProxies.matcher(request.getRemoteAddr()).matches())) {
String remoteIp = null;
- LinkedList<String> proxiesHeaderValue = new LinkedList<>();
+ Deque<String> proxiesHeaderValue = new ArrayDeque<>();
StringBuilder concatRemoteIpHeaderValue = new StringBuilder();
for (Enumeration<String> e = request.getHeaders(remoteIpHeader); e.hasMoreElements();) {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[tomcat] 02/03: Switch Deque implementations from LinkedList to ArrayDeque
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 18fea82fe32fc230f7b7deb327155d5c0f5ae080
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Oct 6 13:55:48 2022 +0100
Switch Deque implementations from LinkedList to ArrayDeque
---
java/jakarta/el/ELContext.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/java/jakarta/el/ELContext.java b/java/jakarta/el/ELContext.java
index 1c86b98121..6ef3001423 100644
--- a/java/jakarta/el/ELContext.java
+++ b/java/jakarta/el/ELContext.java
@@ -16,11 +16,11 @@
*/
package jakarta.el;
+import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Deque;
import java.util.HashMap;
-import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@@ -38,7 +38,7 @@ public abstract class ELContext {
private List<EvaluationListener> listeners;
- private Deque<Map<String,Object>> lambdaArguments = new LinkedList<>();
+ private Deque<Map<String,Object>> lambdaArguments = new ArrayDeque<>();
public ELContext() {
this.resolved = false;
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org