JDK 9 RFR of 8165000: Selector.select(timeout) throws IOException when timeout is a large long

Brian Burkhalter brian.burkhalter at oracle.com
Fri Sep 2 19:22:08 UTC 2016


On Sep 1, 2016, at 8:56 AM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:

> On Sep 1, 2016, at 8:45 AM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:
> 
>> Values much larger than 0x7fffffff in fact *are* accepted which is why I chose this version but I can change it to clamp to 0x7fffffff and remove the kevent() retry.
> 
> Actually from what testing I did it looks as if timeouts in the range [0x7fffffff, 100000000999L] are accepted but those greater than or equal to 100000001000L are not.

Barring objections to the contrary I am going to modify the patch to simply clamp the timeout to Integer.MAX_VALUE, i.e., the maximum value of a 32-bit signed integer.

Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20160902/c7864b6d/attachment.html>


More information about the nio-dev mailing list