Summary
-------
Change implementation of `MulticastSocket::getOption(StandardSocketOption.IP_MULTICAST_IF)` to return `null` rather than a dummy object if the option has not been set.
Problem
-------
`MulticastSocket::getOption(StandardSocketOptions.IP_MULTICAST_IF)` returns a dummy `NetworkInterface` object, instead of `null` if the option has not been set.
By comparison, `DatagramChannel` and `DatagramChannel`'s socket adaptor will return `null` in the same circumstance, which is a much more intuitive behavior, and conforms to the behavior specified by [StandardSocketOptions.IP_MULTICAST_IF][1]:
> The initial/default value of this socket option may be null to
> indicate that outgoing interface will be selected by the operating
> system, typically based on the network routing tables.
Solution
--------
Change the return value of MulticastSocket::getOption(StandardSocketOptions.IP_MULTICAST_IF) to be `null` if the option has not been set.
By long standing behavior, `MulticastSocket::getNetworkInterface` returns a dummy interface when no network interface has been set. For backward compatibility and to avoid introducing unnecessary risks the behavior of this method will remain unchanged. Only the behavior of the `MulticastSocket::getOption(StandardSocketOptions.IP_MULTICAST_IF)` method is changed. This method was added in Java SE 9 so the risks should be limited.
Specification
-------------
There is no change to the specification. However `MulticastSocket::getOption(StandardSocketOptions.IP_MULTICAST_IF)` will now return null if the option has not been set, as specified by [StandardSocketOptions.IP_MULTICAST_IF][1].
[1]: https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/net/StandardSocketOptions.html#IP_MULTICAST_IF