RFR[8233191]: MulticastSocket joinGroup/leaveGroup do not specify their behavior when the outgoing interface has not been set

Daniel Fuchs daniel.fuchs at oracle.com
Thu Dec 5 16:28:01 UTC 2019


On 05/12/2019 16:14, Alan Bateman wrote:
>> bug: https://bugs.openjdk.java.net/browse/JDK-8233191
>> webrev: http://cr.openjdk.java.net/~pconcannon/8233191/webrevs/webrev.00/
> Looks good, just a minor comment that "If <i>null<i> is given and no 
> interface ..." might be a bit better "If {@code null}, and no interface 
> ..." but what you have is okay too.

$ grep null src/java.base/share/classes/java/net/MulticastSocket.java | 
grep '*'
      * Or, if the address is {@code null}, create an unbound socket.
      * @param    bindaddr Socket address to bind to, or {@code null} for
      *        datagram packets, or <i>null</i> to defer to the 
interface set by
      * @throws  IllegalArgumentException if mcastaddr is null or is a
      * @param netIf specifies the local interface or <i>null</i> to defer
      * @throws  IllegalArgumentException if mcastaddr is null or is a

Maybe we could fix all these to consistently use {@code null} then.
I was afraid there would be too many places to fix, but it doesn't
seem too extensive.

best regards,

-- daniel


More information about the net-dev mailing list