Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8233191

MulticastSocket joinGroup/leaveGroup do not specify their behavior when the outgoing interface has not been set

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 14
    • 14
    • core-libs
    • b27

      The 2-arg joinGroup/leaveGroup methods are specified to use the interface set by setNetworkInterface (or setInterface) when invoked with netIf==null. These methods do not specify how they should behave when the outgoing interface for multicast datagrams has not been set. It would not be unreasonable for these methods to throw SocketException although this would be a small behavioral compatibility issue as the long standing (and unspecified behavior) has been to pick a random interface.

      While in the area, the getNetworkInterface (and getInterface) do not specify what they return when an outgoing interface for multicast datagrams has not been set. The long standing behavior has been to return a "useless" network interface (or anyLocalAddress).

            pconcannon Patrick Concannon (Inactive)
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: