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 2021/06/15 19:55:00 UTC
[tomcat] branch main updated: Act on rather old TODO comment
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
The following commit(s) were added to refs/heads/main by this push:
new d82d20e Act on rather old TODO comment
d82d20e is described below
commit d82d20ecfcf5d4c9fd39e37d4e480a4c838c26e3
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Jun 15 20:54:46 2021 +0100
Act on rather old TODO comment
---
java/org/apache/catalina/valves/RemoteIpValve.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/catalina/valves/RemoteIpValve.java b/java/org/apache/catalina/valves/RemoteIpValve.java
index 770c7c4..fcae228 100644
--- a/java/org/apache/catalina/valves/RemoteIpValve.java
+++ b/java/org/apache/catalina/valves/RemoteIpValve.java
@@ -19,6 +19,7 @@ package org.apache.catalina.valves;
import java.io.IOException;
import java.net.InetAddress;
import java.net.UnknownHostException;
+import java.util.Deque;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.LinkedList;
@@ -625,8 +626,7 @@ public class RemoteIpValve extends ValveBase {
if (isInternal || (trustedProxies != null &&
trustedProxies.matcher(originalRemoteAddr).matches())) {
String remoteIp = null;
- // In java 6, proxiesHeaderValue should be declared as a java.util.Deque
- LinkedList<String> proxiesHeaderValue = new LinkedList<>();
+ Deque<String> proxiesHeaderValue = new LinkedList<>();
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