changeset 52393:ae4967993e17

8213210: Change ServerSocket(SocketImpl impl) constructor to protected access Reviewed-by: alanb, chegar
author bpb
date Thu, 01 Nov 2018 09:34:59 -0700
parents cb06c2248720
children 5096007944cf
files src/java.base/share/classes/java/net/ServerSocket.java
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/net/ServerSocket.java	Thu Nov 01 22:41:32 2018 +0800
+++ b/src/java.base/share/classes/java/net/ServerSocket.java	Thu Nov 01 09:34:59 2018 -0700
@@ -76,10 +76,15 @@
     private boolean oldImpl = false;
 
     /**
-     * Package-private constructor to create a ServerSocket associated with
-     * the given SocketImpl.
+     * Creates a server socket with a user-specified {@code SocketImpl}.
+     *
+     * @param      impl an instance of a SocketImpl to use on the ServerSocket.
+     *
+     * @throws     NullPointerException if impl is {@code null}.
+     *
+     * @since 12
      */
-    ServerSocket(SocketImpl impl) {
+    protected ServerSocket(SocketImpl impl) {
         this.impl = impl;
         impl.setServerSocket(this);
     }