Summary
Documentation clarification in java.net.ServerSocket. No behavior change.
Problem
In a previous change (6505016) most of the other socket types had the same clarification added but this was overlooked. ServerSocket::isBound returns true after a socket was bound but is now closed. The docs need to state this explicitly
Solution
Doc change as shown below
Specification
Add text shown to ServerSocket::isBound apidoc:
diff -r 40006c0ada91 src/java.base/share/classes/java/net/ServerSocket.java
--- a/src/java.base/share/classes/java/net/ServerSocket.java Wed Aug 21 00:08:35 2019 +0200
+++ b/src/java.base/share/classes/java/net/ServerSocket.java Wed Aug 21 16:40:44 2019 +0100
@@ -710,6 +710,10 @@
/**
* Returns the binding state of the ServerSocket.
+ * <p>
+ * If the socket was bound prior to being {@linkplain #close closed},
+ * then this method will continue to return {@code true}
+ * after the socket is closed.
*
* @return true if the ServerSocket successfully bound to an address
* @since 1.4
- csr of
-
JDK-8222363 Update ServerSocket.isBound spec to reflect implementation after close
-
- Resolved
-