git: openjdk/mobile: 8243408: Inconsistent Exceptions are thrown by MulticastSocket when sending a DatagramPacket to port 0

duke duke at openjdk.java.net
Wed Apr 22 19:48:05 UTC 2020


Changeset: 42d2a741
Author:    Patrick Concannon <pconcannon at openjdk.org>
Date:      2020-04-22 20:41:56 +0000
URL:       https://git.openjdk.java.net/mobile/commit/42d2a741

8243408: Inconsistent Exceptions are thrown by MulticastSocket when sending a DatagramPacket to port 0

This fix adds a check for port == 0 to MulticastSocket's 2-arg send method to ensure a consistent exception is thrown across platforms

Reviewed-by: dfuchs

! src/java.base/share/classes/java/net/MulticastSocket.java
! test/jdk/java/net/DatagramSocket/SendCheck.java
! test/jdk/java/net/DatagramSocket/SendPortZero.java
+ test/jdk/java/net/MulticastSocket/SendPortZero.java



More information about the mobile-changes mailing list