RFR of JDK-8157543,java/nio/channels/Selector/SelectAndCancel.java fails intermittently

Alan Bateman Alan.Bateman at oracle.com
Tue Apr 24 14:58:01 UTC 2018


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).

-Alan



More information about the nio-dev mailing list