RFR: 8189366: SocketInputStream.available() should check for eof
Chris Hegarty
chris.hegarty at oracle.com
Fri Oct 12 08:55:12 UTC 2018
On 12/10/18 08:29, Alan Bateman wrote:
> On 11/10/2018 09:03, vyom tewari wrote:
>> Hi Chris,
>>
>> Thanks for review, please find the updated
>> webrev(http://cr.openjdk.java.net/~vtewari/8189366/webrev0.1/index.html)
>> where i included the test.
> Can you explain the behavior change for the closed socket case? Will
> this change mean that available returns 0 when it previously throw
> IOException?
You are correct. This is not intentional, or desirable.
We should revert the change or add an additional check
for isClosedOrPending. Since this is already pushed, I
filed a new JIRA issue to track this.
https://bugs.openjdk.java.net/browse/JDK-8212114
-Chris.
More information about the net-dev
mailing list