RFR 4358774: Add null InputStream and OutputStream (original) (raw)
Sergey Bylokhov Sergey.Bylokhov at oracle.com
Sat Dec 9 01:06:49 UTC 2017
- Previous message: RFR 4358774: Add null InputStream and OutputStream
- Next message: RFR 4358774: Add null InputStream and OutputStream
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 08/12/2017 16:49, Brian Burkhalter wrote:
I agree it looks strange but it is intentional as it matches the existing InputStream.read(byte[],int,in) [1]. (I will remove line 167 as part of this patch.) Note that the IOE for the stream being closed would not be thrown in the current code until line 173.
Yes it is match the behavior, but both have a different specifications: In the old methods there is a notion: "
If len
is zero,
then no bytes are read and 0
is returned;" but in the new
method we have only one strong statement: "After the stream has been
closed, these methods all throw {@code IOException}."
-- Best regards, Sergey.
- Previous message: RFR 4358774: Add null InputStream and OutputStream
- Next message: RFR 4358774: Add null InputStream and OutputStream
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]