--- old/src/java.base/unix/classes/sun/nio/ch/PollSelectorImpl.java 2018-10-05 14:14:36.783756953 -0700 +++ new/src/java.base/unix/classes/sun/nio/ch/PollSelectorImpl.java 2018-10-05 14:14:36.448756949 -0700 @@ -42,7 +42,7 @@ * Selector implementation based on poll */ -class PollSelectorImpl extends SelectorImpl { +public class PollSelectorImpl extends SelectorImpl { // initial capacity of poll array private static final int INITIAL_CAPACITY = 16; @@ -67,7 +67,7 @@ private final Object interruptLock = new Object(); private boolean interruptTriggered; - PollSelectorImpl(SelectorProvider sp) throws IOException { + protected PollSelectorImpl(SelectorProvider sp) throws IOException { super(sp); int size = pollArrayCapacity * SIZE_POLLFD; @@ -133,6 +133,14 @@ } /** + * Protected poll method allows different platform-specific + * native implementations + */ + protected int poll(long pollAddress, int numfds, int timeout) { + return poll0(pollAddress, numfds, timeout); + } + + /** * Process changes to the interest ops. */ private void processUpdateQueue() { @@ -377,7 +385,7 @@ return pollArray.getShort(offset); } - private static native int poll(long pollAddress, int numfds, int timeout); + private static native int poll0(long pollAddress, int numfds, int timeout); static { IOUtil.load();