diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/net/DatagramSocketImpl.java --- a/src/java.base/share/classes/java/net/DatagramSocketImpl.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/net/DatagramSocketImpl.java Fri Sep 20 11:07:52 2019 +0100 @@ -70,29 +70,29 @@ /** * Creates a datagram socket. - * @exception SocketException if there is an error in the + * @throws SocketException if there is an error in the * underlying protocol, such as a TCP error. */ protected abstract void create() throws SocketException; /** * Binds a datagram socket to a local port and address. - * @param lport the local port - * @param laddr the local address - * @exception SocketException if there is an error in the - * underlying protocol, such as a TCP error. + * @param lport the local port + * @param laddr the local address + * @throws SocketException if there is an error in the + * underlying protocol, such as a TCP error. */ protected abstract void bind(int lport, InetAddress laddr) throws SocketException; /** * Sends a datagram packet. The packet contains the data and the * destination address to send the packet to. - * @param p the packet to be sent. - * @exception IOException if an I/O exception occurs while sending the - * datagram packet. - * @exception PortUnreachableException may be thrown if the socket is connected - * to a currently unreachable destination. Note, there is no guarantee that - * the exception will be thrown. + * @param p the packet to be sent. + * @throws IOException if an I/O exception occurs while sending the + * datagram packet. + * @throws PortUnreachableException may be thrown if the socket is connected + * to a currently unreachable destination. Note, there is no guarantee that + * the exception will be thrown. */ protected abstract void send(DatagramPacket p) throws IOException; @@ -107,11 +107,11 @@ * packet has been received for that address, then a subsequent call to * send or receive may throw a PortUnreachableException. * Note, there is no guarantee that the exception will be thrown. - * @param address the remote InetAddress to connect to - * @param port the remote port number - * @exception SocketException may be thrown if the socket cannot be - * connected to the remote destination - * @since 1.4 + * @param address the remote InetAddress to connect to + * @param port the remote port number + * @throws SocketException may be thrown if the socket cannot be + * connected to the remote destination + * @since 1.4 */ protected void connect(InetAddress address, int port) throws SocketException {} @@ -124,12 +124,12 @@ /** * Peek at the packet to see who it is from. Updates the specified {@code InetAddress} * to the address which the packet came from. - * @param i an InetAddress object - * @return the port number which the packet came from. - * @exception IOException if an I/O exception occurs - * @exception PortUnreachableException may be thrown if the socket is connected - * to a currently unreachable destination. Note, there is no guarantee that the - * exception will be thrown. + * @param i an InetAddress object + * @return the port number which the packet came from. + * @throws IOException if an I/O exception occurs + * @throws PortUnreachableException may be thrown if the socket is connected + * to a currently unreachable destination. Note, there is no guarantee that the + * exception will be thrown. */ protected abstract int peek(InetAddress i) throws IOException; @@ -138,23 +138,23 @@ * {@code DatagramPacket}. The data is returned, * but not consumed, so that a subsequent peekData/receive operation * will see the same data. - * @param p the Packet Received. - * @return the port number which the packet came from. - * @exception IOException if an I/O exception occurs - * @exception PortUnreachableException may be thrown if the socket is connected - * to a currently unreachable destination. Note, there is no guarantee that the - * exception will be thrown. + * @param p the Packet Received. + * @return the port number which the packet came from. + * @throws IOException if an I/O exception occurs + * @throws PortUnreachableException may be thrown if the socket is connected + * to a currently unreachable destination. Note, there is no guarantee that the + * exception will be thrown. * @since 1.4 */ protected abstract int peekData(DatagramPacket p) throws IOException; /** * Receive the datagram packet. - * @param p the Packet Received. - * @exception IOException if an I/O exception occurs - * while receiving the datagram packet. - * @exception PortUnreachableException may be thrown if the socket is connected - * to a currently unreachable destination. Note, there is no guarantee that the - * exception will be thrown. + * @param p the Packet Received. + * @throws IOException if an I/O exception occurs + * while receiving the datagram packet. + * @throws PortUnreachableException may be thrown if the socket is connected + * to a currently unreachable destination. Note, there is no guarantee that the + * exception will be thrown. */ protected abstract void receive(DatagramPacket p) throws IOException; @@ -163,7 +163,7 @@ * @param ttl a byte specifying the TTL value * * @deprecated use setTimeToLive instead. - * @exception IOException if an I/O exception occurs while setting + * @throws IOException if an I/O exception occurs while setting * the time-to-live option. * @see #getTTL() */ @@ -173,7 +173,7 @@ /** * Retrieve the TTL (time-to-live) option. * - * @exception IOException if an I/O exception occurs + * @throws IOException if an I/O exception occurs * while retrieving the time-to-live option * @deprecated use getTimeToLive instead. * @return a byte representing the TTL value @@ -185,7 +185,7 @@ /** * Set the TTL (time-to-live) option. * @param ttl an {@code int} specifying the time-to-live value - * @exception IOException if an I/O exception occurs + * @throws IOException if an I/O exception occurs * while setting the time-to-live option. * @see #getTimeToLive() */ @@ -193,7 +193,7 @@ /** * Retrieve the TTL (time-to-live) option. - * @exception IOException if an I/O exception occurs + * @throws IOException if an I/O exception occurs * while retrieving the time-to-live option * @return an {@code int} representing the time-to-live value * @see #setTimeToLive(int) @@ -203,7 +203,7 @@ /** * Join the multicast group. * @param inetaddr multicast address to join. - * @exception IOException if an I/O exception occurs + * @throws IOException if an I/O exception occurs * while joining the multicast group. */ protected abstract void join(InetAddress inetaddr) throws IOException; @@ -211,7 +211,7 @@ /** * Leave the multicast group. * @param inetaddr multicast address to leave. - * @exception IOException if an I/O exception occurs + * @throws IOException if an I/O exception occurs * while leaving the multicast group. */ protected abstract void leave(InetAddress inetaddr) throws IOException; @@ -272,9 +272,9 @@ * UnsupportedOperationException}. Subclasses should override this method * with an appropriate implementation. * - * @param The type of the socket option value - * @param name The socket option - * @param value The value of the socket option. A value of {@code null} + * @param The type of the socket option value + * @param name The socket option + * @param value The value of the socket option. A value of {@code null} * may be valid for some options. * * @throws UnsupportedOperationException if the DatagramSocketImpl does not @@ -300,8 +300,8 @@ * UnsupportedOperationException}. Subclasses should override this method * with an appropriate implementation. * - * @param The type of the socket option value - * @param name The socket option + * @param The type of the socket option value + * @param name The socket option * @return the socket option * * @throws UnsupportedOperationException if the DatagramSocketImpl does not