diff --git a/src/main/java/org/xbib/event/loop/nio/NioEventLoop.java b/src/main/java/org/xbib/event/loop/nio/NioEventLoop.java index f0750ae..c44da14 100644 --- a/src/main/java/org/xbib/event/loop/nio/NioEventLoop.java +++ b/src/main/java/org/xbib/event/loop/nio/NioEventLoop.java @@ -136,11 +136,9 @@ public final class NioEventLoop extends SingleThreadEventLoop { } catch (IOException e) { throw new EventLoopException("failed to open a new selector", e); } - if (DISABLE_KEY_SET_OPTIMIZATION) { return new SelectorTuple(unwrappedSelector); } - Class maybeSelectorImplClass = null; try { maybeSelectorImplClass = Class.forName("sun.nio.ch.SelectorImpl", false, @@ -148,7 +146,6 @@ public final class NioEventLoop extends SingleThreadEventLoop { } catch (ClassNotFoundException e) { // } - // ensure the current selector implementation is what we can instrument. if (maybeSelectorImplClass == null || !maybeSelectorImplClass.isAssignableFrom(unwrappedSelector.getClass())) { return new SelectorTuple(unwrappedSelector); @@ -751,7 +748,7 @@ public final class NioEventLoop extends SingleThreadEventLoop { private static boolean isExplicitTryReflectionSetAccessible() { // we disable reflective access boolean defaultValue = javaVersion() < 9 || System.getProperties().containsKey("org.graalvm.nativeimage.imagecode"); - return Boolean.parseBoolean(System.getProperties().getProperty("io.netty.tryReflectionSetAccessible", + return Boolean.parseBoolean(System.getProperties().getProperty("org.xbib.tryReflectionSetAccessible", Boolean.toString(defaultValue))); } diff --git a/src/main/java/org/xbib/event/loop/nio/SelectedSelectionKeySet.java b/src/main/java/org/xbib/event/loop/nio/SelectedSelectionKeySet.java index 93021ae..ddc8aba 100644 --- a/src/main/java/org/xbib/event/loop/nio/SelectedSelectionKeySet.java +++ b/src/main/java/org/xbib/event/loop/nio/SelectedSelectionKeySet.java @@ -20,12 +20,10 @@ final class SelectedSelectionKeySet extends AbstractSet { if (o == null) { return false; } - keys[size++] = o; if (size == keys.length) { increaseCapacity(); } - return true; }