Summary
Deprecate, not for removal, the following methods in java.net.MulticastSocket:
1. MulticastSocket.getInterface()
2. MulticastSocket.setInterface(InetAddress inf)
3. MulticastSocket.joinGroup(InetAddress mcastaddr)
4. MulticastSocket.leaveGroup(InetAddress mcastaddr)
5. MulticastSocket.getLoopbackMode()
6. MulticastSocket.setLoopbackMode(boolean disable)
Problem
Methods 1 - 4 operate on java.net.InetAddress instead of java.net.NetworkInterface and thus do not allow to pass or return the NetworkInterface set for a MulticastSocket. It is preferred to use NetworkInterface as an InetAddress may not uniquely identify a NetworkInterface.
Methods 5 - 6 operate on SocketOptions.IP_MULTICAST_LOOP. However, MulticastSocket.setOption conforms with StandardSocketOptions.IP_MULTICAST_LOOP, which should be used instead.
Solution
Add the @Deprecated annotation and the @deprecated javadoc tag to the methods in question.
Specification
Webrev: http://cr.openjdk.java.net/~jboes/webrevs/8233319/webrev.01/
Specdiff attached.
- csr of
-
JDK-8233319 Deprecate MulticastSocket methods that operate on java.net.InetAddress
-
- Resolved
-