mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8214339: SSLSocketImpl erroneously wraps SocketException
Reviewed-by: ascarpino, jnimeh
This commit is contained in:
parent
e44207a9f6
commit
3933c8477b
6 changed files with 726 additions and 25 deletions
|
@ -122,11 +122,17 @@ enum Alert {
|
|||
reason = (cause != null) ? cause.getMessage() : "";
|
||||
}
|
||||
|
||||
SSLException ssle = (this == UNEXPECTED_MESSAGE) ?
|
||||
new SSLProtocolException(reason) :
|
||||
(handshakeOnly ?
|
||||
new SSLHandshakeException(reason) :
|
||||
new SSLException(reason));
|
||||
SSLException ssle;
|
||||
if ((cause != null) && (cause instanceof IOException)) {
|
||||
ssle = new SSLException(reason);
|
||||
} else if ((this == UNEXPECTED_MESSAGE)) {
|
||||
ssle = new SSLProtocolException(reason);
|
||||
} else if (handshakeOnly) {
|
||||
ssle = new SSLHandshakeException(reason);
|
||||
} else {
|
||||
ssle = new SSLException(reason);
|
||||
}
|
||||
|
||||
if (cause != null) {
|
||||
ssle.initCause(cause);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue