Summary
InterfaceAddress::getBroadcast API documentation is updated to not mention the loopback interface
Problem
The current API documentation may let the reader assume that getBroadcast() will always return null for the loopback interface. This is not the case on all systems.
Solution
Remove mention of the loopback interface and simplify the documentation to simply say:
* Some network interfaces do not support broadcasting and may
* also return {@code null}.
Specification
diff --git a/src/java.base/share/classes/java/net/InterfaceAddress.java b/src/java.base/share/classes/java/net/InterfaceAddress.java
index 6df2de353e3..44b3456c6fc 100644
--- a/src/java.base/share/classes/java/net/InterfaceAddress.java
+++ b/src/java.base/share/classes/java/net/InterfaceAddress.java
@@ -63,8 +63,8 @@ public InetAddress getAddress() {
* Only IPv4 networks have broadcast address therefore, in the case
* of an IPv6 network, {@code null} will be returned.
* <p>
- * Certain network interfaces, such as the loopback interface, do not support
- * broadcasting and will also return {@code null}.
+ * Some network interfaces do not support broadcasting and may
+ * also return {@code null}.
*
* @return the {@code InetAddress} representing the broadcast
* address or {@code null} if there is no broadcast address.
- csr of
-
JDK-8365239 Spec Clarification - InterfaceAddress:getBroadcast() returning null for loop back address
-
- Resolved
-