Any change that fiddles with "available" is never simple!

I confess to not understanding sockets, but intuitively they differ from
files in that eof is a murky concept - there may not be any data from the
other end of the socket right now, but who knows what's coming soon?
What's the difference between eof and closed?

Even for files eof might be murky - if some other process is writing to a
file in append mode, eof might be a transient state.

On Thu, Oct 26, 2017 at 2:26 AM, vyom tewari <vyom.tew...@oracle.com> wrote:

> Hi All,
>
> Please review the simple change below.
>
> Webrev   : http://cr.openjdk.java.net/~vtewari/8189366/webrev0.0/index.
> html
>
> BugId      : https://bugs.openjdk.java.net/browse/JDK-8189366
>
>
> Currently SocketInputStream.available() does not check for "eof" and
> simply delegate to the impl even when "eof" reached. I put a check  to
> return 0 if "eof" is already reached.
>
> Thanks,
>
> Vyom
>
>

Reply via email to