RFR of JDK-8157543,java/nio/channels/Selector/SelectAndCancel.java fails intermittently
Hamlin Li
huaming.li at oracle.com
Wed Apr 25 01:01:40 UTC 2018
On 24/04/2018 10:58 PM, Alan Bateman wrote:
> On 24/04/2018 11:08, Hamlin Li wrote:
>>
>> Original code just report the issue(IOException), but does not throw
>> it, I think it's not correct, and it's easy for engineer/test to miss
>> something.
>> In the patch, no matter which of 3 methods(configureBlocking,
>> register, select) throw IOException, it will be wrapped in a
>> RuntimeException, then rethrow. If any other unchecked exception is
>> thrown, just let it be.
>>
> I was initially wondering if the RuntimeException would appear in the
> log but looking further then it seems the test will actually pass.
> Maybe we should just fix this while we are here, meaning save the
> RuntimeException so that it can be examine by the main thread (after
> it joins).
Hi Alan,
I got your concern, update webrev in place,
http://cr.openjdk.java.net/~mli/8157543/webrev.00/
Although I'm not sure if it's necessary, as the new thread is
non-daemon, so it will finally be joined(I think so) by JVM, and its
exception will cause test failure and message be written to jtreg log.
Thank you
-Hamlin
>
> -Alan
>
More information about the nio-dev
mailing list