JDK 9 RFR of 8165664: (ch) sun.nio.ch.SocketAdaptor does not respect timeout in case of system date/time change and blocks

Roger Riggs Roger.Riggs at Oracle.com
Mon Dec 19 22:26:28 UTC 2016


Looks good.

$.02, Roger


On 12/19/2016 5:14 PM, Brian Burkhalter wrote:
> An updated patch which passes regression tests is here:
>
> http://cr.openjdk.java.net/~bpb/8165664/webrev.01/
>
> Thanks,
>
> Brian
>
> On Dec 19, 2016, at 12:08 PM, Martin Buchholz <martinrb at google.com> wrote:
>
>> It's unfortunate the use of int millis timeout is baked into the API.
>>
>> It's probably best (and traditional) to work with an internal long nanos field anyways, so there are no millisecond sized roundoff errors.
>>
>> I sometimes find it easier to understand if I define a deadline
>> final long deadline = System.nanoTime() + nanosTimeout;
>>
>> I would do unit conversions using methods from TimeUnit.



More information about the nio-dev mailing list