mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8336339: (se) SelectionKey.interestOps(int) should not throw ClosedSelectorException
Reviewed-by: jpai, bpb
This commit is contained in:
parent
22914e0774
commit
9f03f68755
8 changed files with 136 additions and 34 deletions
|
@ -28,7 +28,6 @@ package sun.nio.ch;
|
|||
import java.io.FileDescriptor;
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.channels.ClosedSelectorException;
|
||||
import java.nio.channels.Pipe;
|
||||
import java.nio.channels.SelectionKey;
|
||||
import java.nio.channels.Selector;
|
||||
|
@ -89,11 +88,6 @@ class WEPollSelectorImpl extends SelectorImpl {
|
|||
WEPoll.ctl(eph, EPOLL_CTL_ADD, fd0Val, WEPoll.EPOLLIN);
|
||||
}
|
||||
|
||||
private void ensureOpen() {
|
||||
if (!isOpen())
|
||||
throw new ClosedSelectorException();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int doSelect(Consumer<SelectionKey> action, long timeout)
|
||||
throws IOException
|
||||
|
@ -228,7 +222,6 @@ class WEPollSelectorImpl extends SelectorImpl {
|
|||
|
||||
@Override
|
||||
public void setEventOps(SelectionKeyImpl ski) {
|
||||
ensureOpen();
|
||||
synchronized (updateLock) {
|
||||
updateKeys.addLast(ski);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue