8231719: Correct contradictions in timeout range descriptions

Clarified verbiage in method descriptions.

Reviewed-by: chegar, dfuchs
This commit is contained in:
Patrick Concannon 2019-10-16 11:12:47 +01:00
parent f8440c33d2
commit c497b2b066
3 changed files with 16 additions and 16 deletions

View File

@ -888,14 +888,14 @@ class DatagramSocket implements java.io.Closeable {
}
/** Enable/disable SO_TIMEOUT with the specified timeout, in
* milliseconds. With this option set to a non-zero timeout,
* milliseconds. With this option set to a positive timeout value,
* a call to receive() for this DatagramSocket
* will block for only this amount of time. If the timeout expires,
* a <B>java.net.SocketTimeoutException</B> is raised, though the
* DatagramSocket is still valid. The option <B>must</B> be enabled
* prior to entering the blocking operation to have effect. The
* timeout must be {@code > 0}.
* A timeout of zero is interpreted as an infinite timeout.
* DatagramSocket is still valid. A timeout of zero is interpreted
* as an infinite timeout.
* The option <B>must</B> be enabled prior to entering the blocking
* operation to have effect.
*
* @param timeout the specified timeout in milliseconds.
* @throws SocketException if there is an error in the underlying protocol, such as an UDP error.

View File

@ -749,14 +749,15 @@ class ServerSocket implements java.io.Closeable {
/**
* Enable/disable {@link SocketOptions#SO_TIMEOUT SO_TIMEOUT} with the
* specified timeout, in milliseconds. With this option set to a non-zero
* timeout, a call to accept() for this ServerSocket
* specified timeout, in milliseconds. With this option set to a positive
* timeout value, a call to accept() for this ServerSocket
* will block for only this amount of time. If the timeout expires,
* a <B>java.net.SocketTimeoutException</B> is raised, though the
* ServerSocket is still valid. The option <B>must</B> be enabled
* prior to entering the blocking operation to have effect. The
* timeout must be {@code > 0}.
* A timeout of zero is interpreted as an infinite timeout.
* ServerSocket is still valid. A timeout of zero is interpreted as an
* infinite timeout.
* The option <B>must</B> be enabled prior to entering the blocking
* operation to have effect.
*
* @param timeout the specified timeout, in milliseconds
* @throws SocketException if there is an error in the underlying protocol,
* such as a TCP error

View File

@ -1171,13 +1171,12 @@ class Socket implements java.io.Closeable {
/**
* Enable/disable {@link SocketOptions#SO_TIMEOUT SO_TIMEOUT}
* with the specified timeout, in milliseconds. With this option set
* to a non-zero timeout, a read() call on the InputStream associated with
* to a positive timeout value, a read() call on the InputStream associated with
* this Socket will block for only this amount of time. If the timeout
* expires, a <B>java.net.SocketTimeoutException</B> is raised, though the
* Socket is still valid. The option <B>must</B> be enabled
* prior to entering the blocking operation to have effect. The
* timeout must be {@code > 0}.
* A timeout of zero is interpreted as an infinite timeout.
* Socket is still valid. A timeout of zero is interpreted as an infinite timeout.
* The option <B>must</B> be enabled prior to entering the blocking operation
* to have effect.
*
* @param timeout the specified timeout, in milliseconds.
* @throws SocketException if there is an error in the underlying protocol,