RFR[8243408]: 'Inconsistent Exceptions are thrown by MulticastSocket when sending a DatagramPacket to port 0'
Daniel Fuchs
daniel.fuchs at oracle.com
Wed Apr 22 19:29:00 UTC 2020
Thanks Patrick!
LGTM.
best regards,
-- daniel
On 22/04/2020 20:18, Patrick Concannon wrote:
> 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
>
More information about the net-dev
mailing list