-
Enhancement
-
Resolution: Duplicate
-
P3
-
None
-
15
DatagramSocket()
"Constructs a datagram socket and binds it to any available port on the local host machine . The socket will be bound to the wildcard address, an IP address chosen by the kernel"
::getLocalAddress()
"Returns: or an InetAddress representing wildcard address if either the socket is not bound, or the security manager checkConnect method does not allow the operation"
As the constructor spec says - the socket IS bound and calling ::getLocalAddress()::isAnyLocalAddress() hints that it's really a wildcard address.
::getLocalAddress() spec deserves correction/clarification/update.
"Constructs a datagram socket and binds it to any available port on the local host machine . The socket will be bound to the wildcard address, an IP address chosen by the kernel"
::getLocalAddress()
"Returns: or an InetAddress representing wildcard address if either the socket is not bound, or the security manager checkConnect method does not allow the operation"
As the constructor spec says - the socket IS bound and calling ::getLocalAddress()::isAnyLocalAddress() hints that it's really a wildcard address.
::getLocalAddress() spec deserves correction/clarification/update.
- duplicates
-
JDK-8243999 DatagramSocket and MulticastSocket constructors don't specify how a null InetAddress is handled
- Resolved
- is cloned by
-
JDK-8243507 DatagramSocket constructors don’t always specify what happens when passed invalid parameters
- Resolved