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

commit 2588f924c27bdd37a00245f4c6bfa40b5c56200e
Author: Mark Thomas <[email protected]>
AuthorDate: Fri Apr 17 11:27:16 2026 +0100

    Remove deprecated code
---
 java/org/apache/coyote/http2/HPackHuffman.java | 23 -----------------------
 java/org/apache/coyote/http2/Hpack.java        | 12 ------------
 2 files changed, 35 deletions(-)

diff --git a/java/org/apache/coyote/http2/HPackHuffman.java 
b/java/org/apache/coyote/http2/HPackHuffman.java
index 0b669a7590..27724d9f79 100644
--- a/java/org/apache/coyote/http2/HPackHuffman.java
+++ b/java/org/apache/coyote/http2/HPackHuffman.java
@@ -19,7 +19,6 @@ package org.apache.coyote.http2;
 import java.nio.ByteBuffer;
 import java.util.Arrays;
 import java.util.HashSet;
-import java.util.Locale;
 import java.util.Set;
 
 import org.apache.tomcat.util.res.StringManager;
@@ -429,28 +428,6 @@ public class HPackHuffman {
     }
 
 
-    /**
-     * Encodes the given string into the buffer. If there is not enough space 
in the buffer, or the encoded version is
-     * bigger than the original it will return false and not modify the 
buffers position.
-     *
-     * @param buffer         The buffer to encode into
-     * @param toEncode       The string to encode
-     * @param forceLowercase If the string should be encoded in lower case
-     *
-     * @return true if encoding succeeded
-     *
-     * @deprecated Unused. This method will be removed in Tomcat 12 onwards.
-     */
-    @Deprecated
-    public static boolean encode(ByteBuffer buffer, String toEncode, boolean 
forceLowercase) {
-        if (forceLowercase) {
-            return encode(buffer, toEncode.toLowerCase(Locale.ENGLISH));
-        } else {
-            return encode(buffer, toEncode);
-        }
-    }
-
-
     /**
      * Encodes the given string into the buffer. If there is not enough space 
in the buffer, or the encoded version is
      * bigger than the original it will return false and not modify the 
buffers position.
diff --git a/java/org/apache/coyote/http2/Hpack.java 
b/java/org/apache/coyote/http2/Hpack.java
index cbae7e78a7..3b48d7a7a0 100644
--- a/java/org/apache/coyote/http2/Hpack.java
+++ b/java/org/apache/coyote/http2/Hpack.java
@@ -25,7 +25,6 @@ final class Hpack {
 
     private static final StringManager sm = 
StringManager.getManager(Hpack.class);
 
-    private static final byte LOWER_DIFF = 'a' - 'A';
     static final int DEFAULT_TABLE_SIZE = 4096;
     /*
      * The HPack specification says there SHOULD be an upper bound on this.
@@ -217,17 +216,6 @@ final class Hpack {
         }
     }
 
-    /*
-     * Unused. Will be removed in Tomcat 12 onwards.
-     */
-    @Deprecated
-    static char toLower(char c) {
-        if (c >= 'A' && c <= 'Z') {
-            return (char) (c + LOWER_DIFF);
-        }
-        return c;
-    }
-
 
     private Hpack() {
     }


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

Reply via email to