throw new IllegalBlockingModeException();
}
if (!selector.isOpen()) {
if (0 == interestSet) {
// throw ISE exactly to keep consistency
throw new IllegalSelectorException();
}
// throw NPE exactly to keep consistency
throw new NullPointerException();
}
if (0 == interestSet) {
// throw ISE exactly to keep consistency
throw new IllegalSelectorException();
}
SelectionKey key = keyFor(selector);
if (null == key) {
key = ((AbstractSelector) selector).register(this, interestSet,
attachment);