-
Enhancement
-
Resolution: Duplicate
-
P3
-
None
-
15
There are two DatagramSocket ctors accepting port number.
One of them even has "The local port must be between 0 and 65535 inclusive" assertion.
It turns out that "A port number of zero will let the system pick up an ephemeral port in a bind operation" - assertion from the InetSocketAddress constructor used by the implementation.
Would be good for DatagramSocket ctors to specify that zero port number tells the system to pick any appropriate port number.
One of them even has "The local port must be between 0 and 65535 inclusive" assertion.
It turns out that "A port number of zero will let the system pick up an ephemeral port in a bind operation" - assertion from the InetSocketAddress constructor used by the implementation.
Would be good for DatagramSocket ctors to specify that zero port number tells the system to pick any appropriate port number.
- duplicates
-
JDK-8243507 DatagramSocket constructors don’t always specify what happens when passed invalid parameters
-
- Resolved
-