Merge "Frameworks/base: Fix FastPrintWriter infinite loop" into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
c82a2b5358
@@ -345,7 +345,7 @@ public class FastPrintWriter extends PrintWriter {
|
||||
if (mOutputStream != null) {
|
||||
CharBuffer charBuffer = CharBuffer.wrap(mText, 0, mPos);
|
||||
CoderResult result = mCharset.encode(charBuffer, mBytes, true);
|
||||
while (true) {
|
||||
while (!mIoError) {
|
||||
if (result.isError()) {
|
||||
throw new IOException(result.toString());
|
||||
} else if (result.isOverflow()) {
|
||||
|
||||
Reference in New Issue
Block a user