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

Correct "no comment" warnings in jdk.net module

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 17
    • core-libs
    • None
    • minimal
    • doc only
    • Java API
    • JDK

      Summary

      Resolve "no comment" warnings in the jdk.net module, as identified by javadoc -Xdoclint.

      Problem

      The jdk.net.Sockets class contains several methods that are missing @param and @return tags.

      Solution

      Add the missing tags to the appropriate methods of jdk.net.Sockets.

      Specification

      jdk/net/Sockets.java

       /**
        * Sets the value of a socket option on a {@link java.net.Socket}
        *
        * @param s the socket
        * @param name The socket option
        * @param value The value of the socket option. May be null for some
        *              options.
      + * @param <T> The type of the socket option
        *
           ...
        *
        * @deprecated use {@link java.net.Socket#setOption(SocketOption, Object)} instead.
        *
        * @see java.net.StandardSocketOptions
        */
       @Deprecated(since = "16")
       public static <T> void setOption(Socket s, SocketOption<T> name, T value) throws IOException
      
      
      
       /**
        * Returns the value of a socket option from a {@link java.net.Socket}
        *
        * @param s the socket
        * @param name The socket option
      + * @param <T> The type of the socket option
        *
        * @return The value of the socket option.
        *
           ...
        *
        * @deprecated use {@link java.net.Socket#getOption(SocketOption)} instead.
        *
        * @see java.net.StandardSocketOptions
        */
       @Deprecated(since = "16")
       public static <T> T getOption(Socket s, SocketOption<T> name) throws IOException
      
      
      
       /**
        * Sets the value of a socket option on a {@link java.net.ServerSocket}
        *
        * @param s the socket
        * @param name The socket option
        * @param value The value of the socket option
      + * @param <T> The type of the socket option
        *
           ...
        *
        * @deprecated use {@link java.net.ServerSocket#setOption(SocketOption, Object)} instead.
        *
        * @see java.net.StandardSocketOptions
        */
       @Deprecated(since = "16")
       public static <T> void setOption(ServerSocket s, SocketOption<T> name, T value) throws IOException
      
      
      
       /**
        * Returns the value of a socket option from a {@link java.net.ServerSocket}
        *
        * @param s the socket
        * @param name The socket option
      + * @param <T> The type of the socket option
        *
        * @return The value of the socket option.
        *
           ...
        *
        * @deprecated use {@link java.net.ServerSocket#getOption(SocketOption)} instead.
        *
        * @see java.net.StandardSocketOptions
        */
       @Deprecated(since = "16")
       public static <T> T getOption(ServerSocket s, SocketOption<T> name) throws IOException
      
      
      
       /**
         * Sets the value of a socket option on a {@link java.net.DatagramSocket}
         * or {@link java.net.MulticastSocket}
         *
         * @param s the socket
         * @param name The socket option
         * @param value The value of the socket option
      +  * @param <T> The type of the socket option
         *
           ...
         *
         * @deprecated use {@link java.net.DatagramSocket#setOption(SocketOption, Object)} instead.
         *
         * @see java.net.StandardSocketOptions
         */
       @Deprecated(since = "16")
       public static <T> void setOption(DatagramSocket s, SocketOption<T> name, T value) throws IOException
      
      
      
       /**
        * Returns the value of a socket option from a
        * {@link java.net.DatagramSocket} or {@link java.net.MulticastSocket}
        *
        * @param s the socket
        * @param name The socket option
      + * @param <T> The type of the socket option
        *
          ...
        *
        * @see java.net.StandardSocketOptions
        */
       @Deprecated(since = "16")
       public static <T> T getOption(DatagramSocket s, SocketOption<T> name) throws IOException
      
      
      
       /**
        * Returns a set of {@link java.net.SocketOption}s supported by the
        * given socket type. This set may include standard options and also
        * non standard extended options.
        *
        * @param socketType the type of java.net socket
        *
      + * @return A set of socket options
        *
        * @throws IllegalArgumentException if socketType is not a valid
        *         socket type from the java.net package.
        *
        * @deprecated use {@link Socket#supportedOptions()}, {@link ServerSocket#supportedOptions()},
        *             or {@link DatagramSocket#supportedOptions()} instead.
        */
       @Deprecated(since = "16", forRemoval=true)
       public static Set<SocketOption<?>> supportedOptions(Class<?> socketType) {

            pconcannon Patrick Concannon (Inactive)
            rriggs Roger Riggs
            Chris Hegarty, Daniel Fuchs
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: