8157166: Update spec to account for platforms that do not support multicast
authorchegar
Wed, 22 Jun 2016 09:21:06 +0100
changeset 39138 1e1d98dbb44b
parent 39137 6cf0e983a1e1
child 39139 8c8f2162a4bc
8157166: Update spec to account for platforms that do not support multicast Reviewed-by: alanb
jdk/src/java.base/share/classes/java/net/MulticastSocket.java
jdk/src/java.base/share/classes/java/nio/channels/MulticastChannel.java
--- a/jdk/src/java.base/share/classes/java/net/MulticastSocket.java	Wed Jun 22 09:01:34 2016 +0100
+++ b/jdk/src/java.base/share/classes/java/net/MulticastSocket.java	Wed Jun 22 09:21:06 2016 +0100
@@ -300,8 +300,9 @@
      *
      * @param mcastaddr is the multicast address to join
      *
-     * @exception IOException if there is an error joining
-     * or when the address is not a multicast address.
+     * @exception IOException if there is an error joining, or when the address
+     *            is not a multicast address, or the platform does not support
+     *            multicasting
      * @exception  SecurityException  if a security manager exists and its
      * {@code checkMulticast} method doesn't allow the join.
      *
@@ -384,8 +385,9 @@
      *       {@link MulticastSocket#setInterface(InetAddress)} or
      *       {@link MulticastSocket#setNetworkInterface(NetworkInterface)}
      *
-     * @exception IOException if there is an error joining
-     * or when the address is not a multicast address.
+     * @exception IOException if there is an error joining, or when the address
+     *            is not a multicast address, or the platform does not support
+     *            multicasting
      * @exception  SecurityException  if a security manager exists and its
      * {@code checkMulticast} method doesn't allow the join.
      * @throws  IllegalArgumentException if mcastaddr is null or is a
--- a/jdk/src/java.base/share/classes/java/nio/channels/MulticastChannel.java	Wed Jun 22 09:01:34 2016 +0100
+++ b/jdk/src/java.base/share/classes/java/nio/channels/MulticastChannel.java	Wed Jun 22 09:21:06 2016 +0100
@@ -40,10 +40,11 @@
  * address.
  *
  * <p> In the case of a channel to an {@link StandardProtocolFamily#INET IPv4} socket,
- * the underlying operating system supports <a href="http://www.ietf.org/rfc/rfc2236.txt">
- * <i>RFC&nbsp;2236: Internet Group Management Protocol, Version 2 (IGMPv2)</i></a>.
- * It may optionally support source filtering as specified by <a
- * href="http://www.ietf.org/rfc/rfc3376.txt"> <i>RFC&nbsp;3376: Internet Group
+ * the underlying operating system optionally supports
+ * <a href="http://www.ietf.org/rfc/rfc2236.txt"> <i>RFC&nbsp;2236: Internet Group
+ * Management Protocol, Version 2 (IGMPv2)</i></a>. When IGMPv2 is supported then
+ * the operating system may additionally support source filtering as specified by
+ * <a href="http://www.ietf.org/rfc/rfc3376.txt"> <i>RFC&nbsp;3376: Internet Group
  * Management Protocol, Version 3 (IGMPv3)</i></a>.
  * For channels to an {@link StandardProtocolFamily#INET6 IPv6} socket, the equivalent
  * standards are <a href="http://www.ietf.org/rfc/rfc2710.txt"> <i>RFC&nbsp;2710:
@@ -167,7 +168,8 @@
      *          If the channel already has source-specific membership of the
      *          group on the interface
      * @throws  UnsupportedOperationException
-     *          If the channel's socket is not an Internet Protocol socket
+     *          If the channel's socket is not an Internet Protocol socket, or
+     *          the platform does not support multicasting
      * @throws  ClosedChannelException
      *          If this channel is closed
      * @throws  IOException
@@ -214,8 +216,9 @@
      *          If the channel is currently a member of the group on the given
      *          interface to receive all datagrams
      * @throws  UnsupportedOperationException
-     *          If the channel's socket is not an Internet Protocol socket or
-     *          source filtering is not supported
+     *          If the channel's socket is not an Internet Protocol socket, or
+     *          source filtering is not supported, or the platform does not
+     *          support multicasting
      * @throws  ClosedChannelException
      *          If this channel is closed
      * @throws  IOException