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 ab142e3ed1 Remove deprecated code
ab142e3ed1 is described below

commit ab142e3ed11e7082bcfd8a79113eab98db567af7
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Oct 1 12:00:54 2025 +0100

    Remove deprecated code
---
 .../apache/catalina/filters/RemoteIpFilter.java    | 38 ++--------------------
 .../catalina/filters/TestRemoteIpFilter.java       |  3 +-
 2 files changed, 3 insertions(+), 38 deletions(-)

diff --git a/java/org/apache/catalina/filters/RemoteIpFilter.java 
b/java/org/apache/catalina/filters/RemoteIpFilter.java
index efe96618c9..52943eb8aa 100644
--- a/java/org/apache/catalina/filters/RemoteIpFilter.java
+++ b/java/org/apache/catalina/filters/RemoteIpFilter.java
@@ -947,29 +947,12 @@ public class RemoteIpFilter extends GenericFilter {
         return httpsServerPort;
     }
 
-    /**
-     * Obtain the currently configured regular expression Pattern for internal 
proxies.
-     *
-     * @return The currently configured regular expression Pattern for 
internal proxies
-     *
-     * @deprecated The implementation of this method will be replaced with the 
implementation of
-     *                 {@link #getInternalProxiesAsString()} in Tomcat 12 
onwards with the return type changing to
-     *                 {@code String}
-     */
-    @Deprecated
-    public Pattern getInternalProxies() {
-        return internalProxies;
-    }
-
     /**
      * Obtain the currently configured internal proxies.
      *
      * @return The currently configured internal proxies.
-     *
-     * @deprecated This method will be renamed to {@code getInternalProxies()} 
as of Tomcat 12
      */
-    @Deprecated
-    public String getInternalProxiesAsString() {
+    public String getInternalProxies() {
         if (internalProxies == null) {
             return null;
         }
@@ -1005,29 +988,12 @@ public class RemoteIpFilter extends GenericFilter {
         return requestAttributesEnabled;
     }
 
-    /**
-     * Obtain the currently configured regular expression Pattern for trusted 
proxies.
-     *
-     * @return The currently configured regular expression Pattern for trusted 
proxies
-     *
-     * @deprecated The implementation of this method will be replaced with the 
implementation of
-     *                 {@link #getTrustedProxiesAsString()} in Tomcat 12 
onwards with the return type changing to
-     *                 {@code String}
-     */
-    @Deprecated
-    public Pattern getTrustedProxies() {
-        return trustedProxies;
-    }
-
     /**
      * Obtain the currently configured trusted proxies.
      *
      * @return The currently configured trusted proxies.
-     *
-     * @deprecated This method will be renamed to {@code getInternalProxies()} 
as of Tomcat 12
      */
-    @Deprecated
-    public String getTrustedProxiesAsString() {
+    public String getTrustedProxies() {
         if (trustedProxies == null) {
             return null;
         }
diff --git a/test/org/apache/catalina/filters/TestRemoteIpFilter.java 
b/test/org/apache/catalina/filters/TestRemoteIpFilter.java
index 2cfcd1e224..b5cd1abbe2 100644
--- a/test/org/apache/catalina/filters/TestRemoteIpFilter.java
+++ b/test/org/apache/catalina/filters/TestRemoteIpFilter.java
@@ -844,8 +844,7 @@ public class TestRemoteIpFilter extends TomcatBaseTest {
     @Test
     public void testInternalProxies() throws Exception {
         RemoteIpFilter remoteIpFilter = new RemoteIpFilter();
-        @SuppressWarnings("deprecation")
-        Pattern internalProxiesPattern = 
Pattern.compile(remoteIpFilter.getInternalProxiesAsString());
+        Pattern internalProxiesPattern = 
Pattern.compile(remoteIpFilter.getInternalProxies());
 
         doTestPattern(internalProxiesPattern, "8.8.8.8", false);
         doTestPattern(internalProxiesPattern, "100.62.0.0", false);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to