--- a/src/java.base/share/classes/java/net/Socket.java Tue Mar 26 09:24:01 2019 -0700
+++ b/src/java.base/share/classes/java/net/Socket.java Tue Mar 26 17:02:11 2019 +0000
@@ -581,7 +581,8 @@
* if this socket has an associated channel,
* and the channel is in non-blocking mode
* @throws IllegalArgumentException if endpoint is null or is a
- * SocketAddress subclass not supported by this socket
+ * SocketAddress subclass not supported by this socket, or
+ * if {@code timeout} is negative
* @since 1.4
* @spec JSR-51
*/
@@ -1212,8 +1213,9 @@
* A timeout of zero is interpreted as an infinite timeout.
*
* @param timeout the specified timeout, in milliseconds.
- * @exception SocketException if there is an error
- * in the underlying protocol, such as a TCP error.
+ * @throws SocketException if there is an error in the underlying protocol,
+ * such as a TCP error
+ * @throws IllegalArgumentException if {@code timeout} is negative
* @since 1.1
* @see #getSoTimeout()
*/