From 795cba38cb66dbec85efd0621e3a7302fc1c0c94 Mon Sep 17 00:00:00 2001 From: Tobias Markus Date: Tue, 14 May 2024 07:06:51 +0200 Subject: [PATCH] Use default error action for malformed input and unmappable characters Fixes #6944 --- .../guava/src/com/google/common/io/ReaderInputStream.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/android/guava/src/com/google/common/io/ReaderInputStream.java b/android/guava/src/com/google/common/io/ReaderInputStream.java index af84686ecfd7..e4106aea7414 100644 --- a/android/guava/src/com/google/common/io/ReaderInputStream.java +++ b/android/guava/src/com/google/common/io/ReaderInputStream.java @@ -74,7 +74,7 @@ final class ReaderInputStream extends InputStream { /** * Creates a new input stream that will encode the characters from {@code reader} into bytes using - * the given character set. Malformed input and unmappable characters will be replaced. + * the given character set. * * @param reader input source * @param charset character set used for encoding chars to bytes @@ -85,9 +85,7 @@ final class ReaderInputStream extends InputStream { this( reader, charset - .newEncoder() - .onMalformedInput(CodingErrorAction.REPLACE) - .onUnmappableCharacter(CodingErrorAction.REPLACE), + .newEncoder(), bufferSize); }