8282529: Fix API Note in javadoc for javax.net.ssl.SSLSocket

Reviewed-by: wetmore, xuelei
This commit is contained in:
Zdenek Zambersky 2022-03-14 14:21:58 +00:00 committed by Bradford Wetmore
parent ea9eeea8ff
commit 08573cc3b2

View File

@ -174,17 +174,19 @@ import java.util.function.BiFunction;
* @apiNote * @apiNote
* When the connection is no longer needed, the client and server * When the connection is no longer needed, the client and server
* applications should each close both sides of their respective connection. * applications should each close both sides of their respective connection.
* For {@code SSLSocket} objects, for example, an application can call * This can be done either in one shot by calling {@link Socket#close()},
* {@link Socket#shutdownOutput()} or {@link java.io.OutputStream#close()} * or by closing each side individually using
* for output stream close and call {@link Socket#shutdownInput()} or * {@link Socket#shutdownOutput()} / {@link Socket#shutdownInput()} which is
* {@link java.io.InputStream#close()} for input stream close. Note that * useful for protocol versions that can support half-closed connections.
* in some cases, closing the input stream may depend on the peer's output *
* stream being closed first. If the connection is not closed in an orderly * <P> Note that in some cases, closing the input stream may depend on the
* manner (for example {@link Socket#shutdownInput()} is called before the * peer's output stream being closed first. If the connection is not closed
* peer's write closure notification has been received), exceptions may * in an orderly manner (for example {@link Socket#shutdownInput()} is called
* be raised to indicate that an error has occurred. Once an * before the peer's write closure notification has been received), exceptions
* {@code SSLSocket} is closed, it is not reusable: a new {@code SSLSocket} * may be raised to indicate that an error has occurred.
* must be created. *
* <P> Once an {@code SSLSocket} is closed, it is not reusable: a new
* {@code SSLSocket} must be created.
* *
* @see java.net.Socket * @see java.net.Socket
* @see SSLServerSocket * @see SSLServerSocket