Prior to Java 11, the java.nio.channels.Selector API was implemented to overwrite previous readiness information when using
java.nio.channels.Selector.selectNow() or java.nio.channels.Selector.select(). The
java.nio.channels.Selector.selectNow() method should flush the canceled keys according to the specification, but the behavior prior to Java 11
did not reflect that.
The specification states that the readiness information should not be overwritten and will persist unless
java.nio.channels.Selector.selectNow() or java.nio.channels.Selector.clear() is called to flush the canceled keys.
This behavior was changed to follow the specification in Java 11 and changes might be needed if there is code in place to work around this
previous bug.
For additional information about the java.nio.channels.Selector class, see the
Class java.nio.channels.Selector Java documentation.
For more information on changes in JDK 11, see Release Notes in JDK 11.