RFR: 8287580: (se) CancelledKeyException during channel registration [v2]
Alan Bateman
alanb at openjdk.java.net
Thu Jun 2 18:42:37 UTC 2022
On Thu, 2 Jun 2022 18:28:20 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Ignore `CancelledKeyException` during registration.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>
> 8287580: Add catch to AbstractSelectableChannel, remove remove() from SelectorImpl, open only one SocketChannel in test
src/java.base/share/classes/java/nio/channels/spi/AbstractSelectableChannel.java line 236:
> 234: k.interestOps(ops);
> 235: } catch (CancelledKeyException ignored) {
> 236: }
The register method is specified to throw CKE "If this channel is currently registered with the given selector but the corresponding key has already been cancelled". So we shouldn't be changing anything in this class.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8978
More information about the nio-dev
mailing list