6878369: (ch) AsynchronousSocketChannel read/write methods that specify timeouts should not throw IAE

Alan Bateman Alan.Bateman at oracle.com
Fri Nov 19 13:37:03 PST 2010


This one came up on the nio-discuss list some time ago. In 
AsynchronousSocketChannel, the methods that have a timeout parameter are 
specified to throw IAE when a negative timeout is used. This is 
inconsistent with how timeouts are specified in j.u.c. To fix this, we 
need to change these methods so that they treat values less than or 
equal to zero to mean that the I/O does not have a timeout. The 
implementation change is trivial and I've extended an existing test to 
exercise the code with several timeout values. The webrev is here:
    http://cr.openjdk.java.net/~alanb/6878369/webrev/

Thanks,
Alan.


More information about the nio-dev mailing list