Review request for 6432567: PIT : com/sun/jdi/BadHandshakeTest.java fails due to java.net.ConnectException

Alan Bateman Alan.Bateman at Sun.COM
Thu Aug 27 21:54:06 PDT 2009


Daniel D. Daugherty wrote:
>
>
> :
> Shouldn't this:
>
> 173         b[expected] = '\0'; /* ensure null-terminated */
>
> be this:
>
> 173         b[received] = '\0'; /* ensure null-terminated */
>
> To cover the case of a short receive count...
They are the equal at this point because the read loop has read the 
number of expected bytes. If the expected number of the bytes isn't 
received then it is caught by the inter-byte timeout. However, in terms 
of readability, you have a point - thanks Dan!

-Alan.



More information about the serviceability-dev mailing list