JDK-8196298: Add null Reader and Writer

Brian Burkhalter brian.burkhalter at oracle.com
Thu Feb 1 21:26:23 UTC 2018


On Jan 30, 2018, at 8:52 AM, Patrick Reinhart <patrick at reini.net> wrote:

>> Am 30.01.2018 um 16:02 schrieb Alan Bateman <Alan.Bateman at oracle.com>:
>> 
>> […]
>> 
>> 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?

Yes: there is no such lock instance variable for those classes. Probably it would not hurt to add a one liner to each method’s doc as Alan suggested.

Thanks,

Brian


More information about the core-libs-dev mailing list