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 a10a458b81449df3869756f8ddafe2b2ca5c4fdb
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Nov 7 14:11:36 2023 +0000

    Reduce code duplication
---
 java/org/apache/catalina/core/ApplicationHttpRequest.java | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/java/org/apache/catalina/core/ApplicationHttpRequest.java 
b/java/org/apache/catalina/core/ApplicationHttpRequest.java
index fe2c400219..529faeed05 100644
--- a/java/org/apache/catalina/core/ApplicationHttpRequest.java
+++ b/java/org/apache/catalina/core/ApplicationHttpRequest.java
@@ -755,13 +755,7 @@ class ApplicationHttpRequest extends 
HttpServletRequestWrapper {
      * @return true if the attribute was a special attribute, false otherwise
      */
     protected boolean removeSpecial(String name) {
-        for (int i = 0; i < specials.length; i++) {
-            if (specials[i].equals(name)) {
-                specialAttributes[i] = null;
-                return true;
-            }
-        }
-        return false;
+        return setSpecial(name, null);
     }
 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to