equal
deleted
inserted
replaced
120 SSLException createSSLException(String reason, Throwable cause) { |
120 SSLException createSSLException(String reason, Throwable cause) { |
121 if (reason == null) { |
121 if (reason == null) { |
122 reason = (cause != null) ? cause.getMessage() : ""; |
122 reason = (cause != null) ? cause.getMessage() : ""; |
123 } |
123 } |
124 |
124 |
125 SSLException ssle = (this == UNEXPECTED_MESSAGE) ? |
125 SSLException ssle; |
126 new SSLProtocolException(reason) : |
126 if ((cause != null) && (cause instanceof IOException)) { |
127 (handshakeOnly ? |
127 ssle = new SSLException(reason); |
128 new SSLHandshakeException(reason) : |
128 } else if ((this == UNEXPECTED_MESSAGE)) { |
129 new SSLException(reason)); |
129 ssle = new SSLProtocolException(reason); |
|
130 } else if (handshakeOnly) { |
|
131 ssle = new SSLHandshakeException(reason); |
|
132 } else { |
|
133 ssle = new SSLException(reason); |
|
134 } |
|
135 |
130 if (cause != null) { |
136 if (cause != null) { |
131 ssle.initCause(cause); |
137 ssle.initCause(cause); |
132 } |
138 } |
133 |
139 |
134 return ssle; |
140 return ssle; |