Details
-
Type:
CSR
-
Status: Closed
-
Priority:
P4
-
Resolution: Approved
-
Fix Version/s: 14
-
Component/s: core-libs
-
Labels:None
-
Subcomponent:
-
Compatibility Kind:behavioral
-
Compatibility Risk:minimal
-
Compatibility Risk Description:Just a documentation change to make spec compatible with existing behavior.
-
Interface Kind:Java API
-
Scope:SE
Description
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
Attachments
Issue Links
- csr of
-
JDK-8222363 Update ServerSocket.isBound spec to reflect implementation after close
-
- Resolved
-