--- old/src/java.base/unix/classes/sun/nio/ch/PollSelectorImpl.java 2018-06-04 11:02:20.977275220 -0700 +++ new/src/java.base/unix/classes/sun/nio/ch/PollSelectorImpl.java 2018-06-04 11:02:20.713275215 -0700 @@ -40,7 +40,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; @@ -65,7 +65,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; @@ -128,6 +128,10 @@ return updateSelectedKeys(); } + protected int poll(long pollAddress, int numfds, int timeout) { + return poll0(pollAddress, numfds, timeout); + } + /** * Process changes to the interest ops. */ @@ -383,7 +387,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();