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:30:39 UTC

[tomcat] branch 9.0.x updated (dbf94fed6f -> 9abedf44ec)

This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


    from dbf94fed6f Update after switch to StringUtils
     new 65fbfb0c71 Refactor LinkedList to Deque and ArrayDeque
     new e9a09512c9 Switch Deque implementations from LinkedList to ArrayDeque
     new 9abedf44ec 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/javax/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 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 9abedf44ecd9aa19ecf214f2e09817b73069b19e
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 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 65fbfb0c71910f9a96d4df31c989fcccb6a848f4
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 3f129189fb..a264ef27e5 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 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit e9a09512c9c2914340e896864a5a2cf9fc53c568
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Oct 6 13:55:48 2022 +0100

    Switch Deque implementations from LinkedList to ArrayDeque
---
 java/javax/el/ELContext.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/javax/el/ELContext.java b/java/javax/el/ELContext.java
index 58c5db5e81..65feac5aa1 100644
--- a/java/javax/el/ELContext.java
+++ b/java/javax/el/ELContext.java
@@ -16,11 +16,11 @@
  */
 package javax.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