Skip to content

Commit

Permalink
Port change from apache/tomcat@a9ca102
Browse files Browse the repository at this point in the history
  • Loading branch information
rzo1 committed Oct 11, 2023
1 parent ee63aa4 commit 437df3b
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,8 @@ public B2CConverter(Charset charset, boolean replaceOnError) {
} else {
action = CodingErrorAction.REPORT;
}
// Special case. Use the Apache Harmony based UTF-8 decoder because it
// - a) rejects invalid sequences that the JVM decoder does not
// - b) fails faster for some invalid sequences
if (charset.equals(StandardCharsets.UTF_8)) {
decoder = new Utf8Decoder();
} else {
decoder = charset.newDecoder();
}

decoder = charset.newDecoder();
decoder.onMalformedInput(action);
decoder.onUnmappableCharacter(action);
}
Expand Down

0 comments on commit 437df3b

Please sign in to comment.