Re: Socket InputStream.available may return a positive value after shutdown

2011-08-16 Thread Chris Hegarty
Here is a first stab at fixing this issue. http://cr.openjdk.java.net/~chegar/7014860/webrev.00/webrev/ -Chris. On 07/21/11 09:42 AM, Jing LV wrote: Hi, Thank you Chris! Would you please send the link when you have some progress? 于 2011-7-18 18:00, Chris Hegarty 写道: On 07/18/11 09:09 AM,

Re: Socket InputStream.available may return a positive value after shutdown

2011-08-15 Thread Jing LV
Thanks Chris, the fix is fine to me. 于 2011-8-12 18:03, Chris Hegarty 写道: On 11/08/2011 19:31, Michael McMahon wrote: On 11/08/11 17:27, Alan Bateman wrote: Chris Hegarty wrote: Here is a first stab at fixing this issue. http://cr.openjdk.java.net/~chegar/7014860/webrev.00/webrev/ -Chris.

Re: Socket InputStream.available may return a positive value after shutdown

2011-08-12 Thread Chris Hegarty
On 11/08/2011 19:31, Michael McMahon wrote: On 11/08/11 17:27, Alan Bateman wrote: Chris Hegarty wrote: Here is a first stab at fixing this issue. http://cr.openjdk.java.net/~chegar/7014860/webrev.00/webrev/ -Chris. The spec clarification seems reasonable to me. Small typo "the streams ava

Re: Socket InputStream.available may return a positive value after shutdown

2011-08-11 Thread Michael McMahon
On 11/08/11 17:27, Alan Bateman wrote: Chris Hegarty wrote: Here is a first stab at fixing this issue. http://cr.openjdk.java.net/~chegar/7014860/webrev.00/webrev/ -Chris. The spec clarification seems reasonable to me. Small typo "the streams available method" to "the stream's available met

Re: Socket InputStream.available may return a positive value after shutdown

2011-08-11 Thread Chris Hegarty
On 08/11/11 05:27 PM, Alan Bateman wrote: Chris Hegarty wrote: Here is a first stab at fixing this issue. http://cr.openjdk.java.net/~chegar/7014860/webrev.00/webrev/ -Chris. The spec clarification seems reasonable to me. Small typo "the streams available method" to "the stream's available me

Re: Socket InputStream.available may return a positive value after shutdown

2011-08-11 Thread Alan Bateman
Chris Hegarty wrote: Here is a first stab at fixing this issue. http://cr.openjdk.java.net/~chegar/7014860/webrev.00/webrev/ -Chris. The spec clarification seems reasonable to me. Small typo "the streams available method" to "the stream's available method". Good to see the NIO socket adapt

Re: Socket InputStream.available may return a positive value after shutdown

2011-07-21 Thread Jing LV
Hi, Thank you Chris! Would you please send the link when you have some progress? 于 2011-7-18 18:00, Chris Hegarty 写道: On 07/18/11 09:09 AM, Jing LV wrote: Hi Chris, Alan, Thanks for reply. I am looking for a conclusion and solution for this issue. If I understand correctly, it'd fix the

Re: Socket InputStream.available may return a positive value after shutdown

2011-07-18 Thread Chris Hegarty
On 07/18/11 09:09 AM, Jing LV wrote: Hi Chris, Alan, Thanks for reply. I am looking for a conclusion and solution for this issue. If I understand correctly, it'd fix the spec rather than fix the code? The current plan of record is to clarify the spec to indicate that available will return 0 a

Re: Socket InputStream.available may return a positive value after shutdown

2011-07-18 Thread Jing LV
Hi Chris, Alan, Thanks for reply. I am looking for a conclusion and solution for this issue. If I understand correctly, it'd fix the spec rather than fix the code? 于 2011-7-14 17:00, Chris Hegarty 写道: On 07/14/11 09:36 AM, Alan Bateman wrote: Chris Hegarty wrote: : I can't see that an

Re: Socket InputStream.available may return a positive value after shutdown

2011-07-14 Thread Chris Hegarty
On 07/14/11 09:36 AM, Alan Bateman wrote: Chris Hegarty wrote: : I can't see that anyone could be depending on the fact the available() would return > 0 after shutdownInput(), given that subsequent reads will always return -1. I just can't see why anyone would require this, but maybe I'm missin

Re: Socket InputStream.available may return a positive value after shutdown

2011-07-14 Thread Alan Bateman
Chris Hegarty wrote: : I can't see that anyone could be depending on the fact the available() would return > 0 after shutdownInput(), given that subsequent reads will always return -1. I just can't see why anyone would require this, but maybe I'm missing something. You're probably right, and

Re: Socket InputStream.available may return a positive value after shutdown

2011-07-13 Thread Chris Hegarty
On 07/13/11 06:39 PM, Alan Bateman wrote: Jing LV wrote: Hello, Alan (or anyone else), do we have time to discuss these postponed defects? Or do you have a outlook for this? Thank you. Sorry for the late reply, I've been on vacation. Sorry, I also meant to respond. Just got lost in all the

Re: Socket InputStream.available may return a positive value after shutdown

2011-07-13 Thread Alan Bateman
Jing LV wrote: Hello, Alan (or anyone else), do we have time to discuss these postponed defects? Or do you have a outlook for this? Thank you. Sorry for the late reply, I've been on vacation. I think now is a good time to discuss this one. As I mentioned in the initial discussion, t

Re: Socket InputStream.available may return a positive value after shutdown

2011-07-07 Thread Steve Poole
On 06/07/11 10:05, Jing LV wrote: Hello, Alan (or anyone else), do we have time to discuss these postponed defects? Or do you have a outlook for this? Thank you. Hi Jimmy - it may be that everyone is very busy with the Java 7 launch and, probably, collapsing in a heap after all the

Re: Socket InputStream.available may return a positive value after shutdown

2011-07-06 Thread Jing LV
Hello, Alan (or anyone else), do we have time to discuss these postponed defects? Or do you have a outlook for this? Thank you. 于 2011-4-27 18:35, Alan Bateman 写道: Jing LV wrote: Hello, Currently I don't see any patch available so I am trying to create one by myself. I see the

Re: Socket InputStream.available may return a positive value after shutdown

2011-04-27 Thread Alan Bateman
Jing LV wrote: Hello, Currently I don't see any patch available so I am trying to create one by myself. I see the problem occurs in AbstractPlainSocketImpl.available() and it seems it is design to return 0 when meed a closed socket - this may not be correct according to the spec, thus ch

Re: Socket InputStream.available may return a positive value after shutdown

2011-04-27 Thread Jing LV
于 2011-2-22 17:38, Alan Bateman 写道: Jing LV wrote: Thanks Alan - any luck till now? Yes, it's there: http://bugs.sun.com/view_bug.do?bug_id=7014860 Hello, Currently I don't see any patch available so I am trying to create one by myself. I see the problem occurs in AbstractPlainSocketI

Re: Socket InputStream.available may return a positive value after shutdown

2011-02-22 Thread Alan Bateman
Jing LV wrote: Thanks Alan - any luck till now? Yes, it's there: http://bugs.sun.com/view_bug.do?bug_id=7014860

Re: Socket InputStream.available may return a positive value after shutdown

2011-02-22 Thread Jing LV
于 2011-2-17 17:30, Alan Bateman 写道: Jing LV wrote: Thanks Alan! I try to follow this issue but has no luck on bugs.sun.com with the number 7014860. Am I miss something? I suspect there is a problem on bugs.sun.com as it doesn't seem to be showing any bugs. I noticed a "maintenance in progress

Re: Socket InputStream.available may return a positive value after shutdown

2011-02-17 Thread Alan Bateman
Jing LV wrote: Thanks Alan! I try to follow this issue but has no luck on bugs.sun.com with the number 7014860. Am I miss something? I suspect there is a problem on bugs.sun.com as it doesn't seem to be showing any bugs. I noticed a "maintenance in progress" (or a message to that effect )a fe

Re: Socket InputStream.available may return a positive value after shutdown

2011-02-17 Thread Jing LV
于 2011-1-26 20:32, Alan Bateman 写道: Jing LV wrote: Hello, I am using java.net.Socket and find an strange behaviour. If Socket inputstream is shutdown, and there was still some data remaining, its available() method may still return a positive value. I checked with the java spec, and the documen

Re: Socket InputStream.available may return a positive value after shutdown

2011-01-26 Thread Alan Bateman
Jing LV wrote: Hello, I am using java.net.Socket and find an strange behaviour. If Socket inputstream is shutdown, and there was still some data remaining, its available() method may still return a positive value. I checked with the java spec, and the document of Socket.shutdownInput() said: "Pl

Socket InputStream.available may return a positive value after shutdown

2011-01-25 Thread Jing LV
Hello, I am using java.net.Socket and find an strange behaviour. If Socket inputstream is shutdown, and there was still some data remaining, its available() method may still return a positive value. I checked with the java spec, and the document of Socket.shutdownInput() said: "Places the input st