Skip to content

Commit 795cba3

Browse files
committed
Use default error action for malformed input and unmappable characters
Fixes google#6944
1 parent cc28751 commit 795cba3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

android/guava/src/com/google/common/io/ReaderInputStream.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ final class ReaderInputStream extends InputStream {
7474

7575
/**
7676
* Creates a new input stream that will encode the characters from {@code reader} into bytes using
77-
* the given character set. Malformed input and unmappable characters will be replaced.
77+
* the given character set.
7878
*
7979
* @param reader input source
8080
* @param charset character set used for encoding chars to bytes
@@ -85,9 +85,7 @@ final class ReaderInputStream extends InputStream {
8585
this(
8686
reader,
8787
charset
88-
.newEncoder()
89-
.onMalformedInput(CodingErrorAction.REPLACE)
90-
.onUnmappableCharacter(CodingErrorAction.REPLACE),
88+
.newEncoder(),
9189
bufferSize);
9290
}
9391

0 commit comments

Comments
 (0)