RFR: 8290002: (se) AssertionError in SelectorImpl.implCloseSelector

Alan Bateman alanb at openjdk.org
Mon Jul 11 07:09:04 UTC 2022


This change adjusts an incorrect assert in the Selector implementation. The assert is incorrect since JDK 11 and JDK-8201315. The correct assert here is to test that the selector's selected-key set is empty. The selector's key set is not guaranteed to be empty here as there may be other threads registering channels while the selector is being closed.

-------------

Commit messages:
 - Initial commit

Changes: https://git.openjdk.org/jdk/pull/9442/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9442&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8290002
  Stats: 4 lines in 1 file changed: 1 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/9442.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/9442/head:pull/9442

PR: https://git.openjdk.org/jdk/pull/9442


More information about the nio-dev mailing list