mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8274079: Cleanup unnecessary calls to Throwable.initCause() in java.base module
Reviewed-by: weijun
This commit is contained in:
parent
8609ea55ac
commit
1459180f35
22 changed files with 55 additions and 132 deletions
|
@ -372,12 +372,9 @@ public class SSLContext {
|
|||
try {
|
||||
return contextSpi.engineCreateSSLEngine();
|
||||
} catch (AbstractMethodError e) {
|
||||
UnsupportedOperationException unsup =
|
||||
new UnsupportedOperationException(
|
||||
"Provider: " + getProvider() +
|
||||
" doesn't support this operation");
|
||||
unsup.initCause(e);
|
||||
throw unsup;
|
||||
throw new UnsupportedOperationException(
|
||||
"Provider: " + getProvider() +
|
||||
" doesn't support this operation", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -412,12 +409,9 @@ public class SSLContext {
|
|||
try {
|
||||
return contextSpi.engineCreateSSLEngine(peerHost, peerPort);
|
||||
} catch (AbstractMethodError e) {
|
||||
UnsupportedOperationException unsup =
|
||||
new UnsupportedOperationException(
|
||||
"Provider: " + getProvider() +
|
||||
" does not support this operation");
|
||||
unsup.initCause(e);
|
||||
throw unsup;
|
||||
throw new UnsupportedOperationException(
|
||||
"Provider: " + getProvider() +
|
||||
" does not support this operation", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue