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:29:38 UTC
[tomcat] branch 10.0.x updated (c28cc5e1f4 -> b899a62782)
This is an automated email from the ASF dual-hosted git repository.
markt pushed a change to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
from c28cc5e1f4 Update after switch to StringUtils
new 66e9f716b9 Refactor LinkedList to Deque and ArrayDeque
new dd2643f3bc Switch Deque implementations from LinkedList to ArrayDeque
new b899a62782 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 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit b899a627824b232367db12f9aafbdffcf05175f5
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] 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 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit dd2643f3bc3729c189bde840ec3d996d6391ceb1
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 c58037a1b2..3375cbcb42 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
[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 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 66e9f716b9758ba5a9e2c76c3950f1542c4b1fc9
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