This is an automated email from the ASF dual-hosted git repository.
markt-asf 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 8c25ec5e29 Remove deprecated code
8c25ec5e29 is described below
commit 8c25ec5e29603837076403ee683120f77a3fe408
Author: Mark Thomas <[email protected]>
AuthorDate: Tue Jun 2 22:00:11 2026 +0100
Remove deprecated code
---
java/org/apache/tomcat/util/buf/B2CConverter.java | 23 ++---------------------
1 file changed, 2 insertions(+), 21 deletions(-)
diff --git a/java/org/apache/tomcat/util/buf/B2CConverter.java
b/java/org/apache/tomcat/util/buf/B2CConverter.java
index 1eae1e900b..55b8fc4e2e 100644
--- a/java/org/apache/tomcat/util/buf/B2CConverter.java
+++ b/java/org/apache/tomcat/util/buf/B2CConverter.java
@@ -86,30 +86,11 @@ public class B2CConverter {
* @param charset the charset to use for decoding
*/
public B2CConverter(Charset charset) {
- this(charset, false);
- }
-
- /**
- * Constructs a B2CConverter for the given charset.
- *
- * @param charset the charset to use for decoding
- * @param replaceOnError if {@code true}, replace malformed/unmappable
input; otherwise report errors
- *
- * @deprecated Unused. Will be removed in Tomcat 12 onwards. Use {@link
B2CConverter#B2CConverter(Charset)}
- */
- @Deprecated
- public B2CConverter(Charset charset, boolean replaceOnError) {
byte[] left = new byte[LEFTOVER_SIZE];
leftovers = ByteBuffer.wrap(left);
- CodingErrorAction action;
- if (replaceOnError) {
- action = CodingErrorAction.REPLACE;
- } else {
- action = CodingErrorAction.REPORT;
- }
decoder = charset.newDecoder();
- decoder.onMalformedInput(action);
- decoder.onUnmappableCharacter(action);
+ decoder.onMalformedInput(CodingErrorAction.REPORT);
+ decoder.onUnmappableCharacter(CodingErrorAction.REPORT);
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]