-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make nullWriter().append(...) (both overloads) accept a null CharSequ…
…ence. The docs of Writer are misleading: """ An invocation of this method of the form out.append(csq) behaves in exactly the same way as the invocation out.write(csq.toString()) """ https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html#append%28java.lang.CharSequence%29 But that's not true, as the docs go on to say: """ csq - The character sequence to append. If csq is null, then the four characters "null" are appended to this writer. """ Accepting null in the 2-arg method is arguably even weirder, but at least the docs call it out more prominently: https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html#append%28java.lang.CharSequence,%20int,%20int%29 Credit to the Checker Framework for identifying this bug. RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=298388993
- Loading branch information
Showing
4 changed files
with
38 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters