> On 18 Dec 2019, at 13:14, Alan Bateman <alan.bate...@oracle.com> wrote:
> 
> 
> … because MulticastSocket can't work with a DatagramSocketImpl that hasn't 
> been upgraded.

Specifically on this point, the two-arg variants of `joinGroup` and
`leaveGroup` throw an UnsupportedOperationException if invoked on a
MulticastSocket that has a DatagramSocketImpl which was compiled against
a pre-1.4 version of the DSI interface. ( these abstract methods were
only added to the DSI interface in Java 1.4 )

Also note, that the single-arg variants of these methods have been
deprecated ( by 8233319 [1] ), so there is no real "blessed" workaround
to avoid the two-arg `joinGroup` and `leaveGroup`, if one is writing
new, or migrating existing, code to use MS.

-Chris.

[1] 8233319: Deprecate MulticastSocket methods that operate on 
java.net.InetAddress

Reply via email to