Skip to content

Commit

Permalink
Use default error action for malformed input and unmappable characters
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbi committed May 14, 2024
1 parent cc28751 commit 795cba3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions android/guava/src/com/google/common/io/ReaderInputStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -85,9 +85,7 @@ final class ReaderInputStream extends InputStream {
this(
reader,
charset
.newEncoder()
.onMalformedInput(CodingErrorAction.REPLACE)
.onUnmappableCharacter(CodingErrorAction.REPLACE),
.newEncoder(),
bufferSize);
}

Expand Down

0 comments on commit 795cba3

Please sign in to comment.