--- old/src/jdk.net/linux/classes/jdk/internal/net/rdma/RdmaServerSocketChannelImpl.java 2018-11-28 16:36:32.272693091 +0000 +++ new/src/jdk.net/linux/classes/jdk/internal/net/rdma/RdmaServerSocketChannelImpl.java 2018-11-28 16:36:31.896693104 +0000 @@ -80,8 +80,17 @@ private ServerSocket socket; + private static final UnsupportedOperationException unsupported; + + private static final SelectorProvider checkSupported(SelectorProvider sp) { + if (unsupported != null) + throw new UnsupportedOperationException(unsupported.getMessage(), unsupported); + else + return sp; + } + RdmaServerSocketChannelImpl(SelectorProvider sp) throws IOException { - super(sp); + super(checkSupported(sp)); this.fd = RdmaNet.serverSocket(); this.fdVal = IOUtil.fdVal(fd); } @@ -89,7 +98,7 @@ RdmaServerSocketChannelImpl(SelectorProvider sp, FileDescriptor fd, boolean bound) throws IOException { - super(sp); + super(checkSupported(sp)); this.fd = fd; this.fdVal = IOUtil.fdVal(fd); if (bound) { @@ -469,12 +478,18 @@ InetSocketAddress[] isaa) throws IOException; - private static native void initIDs(); + private static native void initIDs()throws UnsupportedOperationException; static { IOUtil.load(); System.loadLibrary("extnet"); - initIDs(); + UnsupportedOperationException uoe = null; + try { + initIDs(); + } catch (UnsupportedOperationException e) { + uoe = e; + } + unsupported = uoe; nd = new RdmaSocketDispatcher(); } }