Hi,
Could someone please review my fix for JDK-8243408 'Inconsistent
Exceptions are thrown by MulticastSocket when sending a DatagramPacket
to port 0'?
Currently, MulticastSocket.send(DatagramPacket, byte) throws an
IOException when sending to port 0 on Unix and macOS, but doesn’t throw
on Windows and Solaris.
This fix adds a check for port == 0 to MulticastSocket's 2-arg send
method to ensure a consistent exceptionis thrown across platforms, i.e.
a SocketException. This follows on from a similar change made to the
DatagramSocket and DatagramChannel's send method. See JDK-8240533
<https://bugs.openjdk.java.net/browse/JDK-8240533> for more details
bug: https://bugs.openjdk.java.net/browse/JDK-8243408
webrev: http://cr.openjdk.java.net/~pconcannon/8243408/webrevs/webrev.00/
Kind regards,
Patrick