JDK-8196298: Add null Reader and Writer

Patrick Reinhart patrick at reini.net
Tue Jan 30 16:52:01 UTC 2018



> Am 30.01.2018 um 16:02 schrieb Alan Bateman <Alan.Bateman at oracle.com>:
> 
> On 29/01/2018 22:55, Brian Burkhalter wrote:
>> I made a few minor changes to the CSR [1] verbiage. Probably the nullWriter() documentation should also be updated to explicitly mention all variants of both append() and write().
>> 
> It could although limiting it to the abstract methods should be fine too as the append methods are specified in terms of the write methods.
> 
> One other micro detail is that Reader/Writer support implementations specifying the object to use for synchronization. This isn't interesting for the Reader/Writer objects returned by the proposed static methods so a one-line that says that the object used to synchronize operations is not specified might help. It would avoid something synchronizing on the reader or writer and expecting operations read/write methods to block

Is that a difference from the null InputStream/OutputStream here?

-Patrick



More information about the core-libs-dev mailing list