Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use default error action for malformed input and unmappable characters #7218

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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