rsocket-branch: fix null arg checking in factories rsocket-branch
authorchegar
Mon, 28 Jan 2019 14:50:53 +0000
branchrsocket-branch
changeset 57117 7f1b415bfede
parent 57116 5e54d94c238a
child 57120 64301e5a0da8
rsocket-branch: fix null arg checking in factories
src/jdk.net/share/classes/jdk/net/RdmaSockets.java
--- a/src/jdk.net/share/classes/jdk/net/RdmaSockets.java	Mon Jan 28 13:56:39 2019 +0000
+++ b/src/jdk.net/share/classes/jdk/net/RdmaSockets.java	Mon Jan 28 14:50:53 2019 +0000
@@ -94,7 +94,7 @@
      *         platform.
      */
     public static Socket openSocket(ProtocolFamily family) throws IOException {
-        Objects.requireNonNull("protocol family is null");
+        Objects.requireNonNull(family, "protocol family is null");
         return RdmaSocketProvider.openSocket(family);
     }
 
@@ -124,7 +124,7 @@
      */
     public static ServerSocket openServerSocket(ProtocolFamily family)
             throws IOException {
-        Objects.requireNonNull("protocol family is null");
+        Objects.requireNonNull(family, "protocol family is null");
         return RdmaSocketProvider.openServerSocket(family);
     }
 
@@ -158,7 +158,7 @@
      */
     public static SocketChannel openSocketChannel(ProtocolFamily family)
             throws IOException {
-        Objects.requireNonNull("protocol family is null");
+        Objects.requireNonNull(family, "protocol family is null");
         SelectorProvider provider = RdmaPollSelectorProvider.provider();
         return ((RdmaPollSelectorProvider)provider).openSocketChannel(family);
     }
@@ -188,7 +188,7 @@
      */
     public static ServerSocketChannel openServerSocketChannel(
             ProtocolFamily family) throws IOException {
-        Objects.requireNonNull("protocol family is null");
+        Objects.requireNonNull(family, "protocol family is null");
         SelectorProvider provider = RdmaPollSelectorProvider.provider();
         return ((RdmaPollSelectorProvider)provider)
                 .openServerSocketChannel(family);