mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +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
|
@ -181,10 +181,7 @@ public final class DESedeWrapCipher extends CipherSpi {
|
|||
engineInit(opmode, key, (AlgorithmParameterSpec) null, random);
|
||||
} catch (InvalidAlgorithmParameterException iape) {
|
||||
// should never happen
|
||||
InvalidKeyException ike =
|
||||
new InvalidKeyException("Parameters required");
|
||||
ike.initCause(iape);
|
||||
throw ike;
|
||||
throw new InvalidKeyException("Parameters required", iape);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -285,11 +282,8 @@ public final class DESedeWrapCipher extends CipherSpi {
|
|||
paramsEng.engineInit(params.getEncoded());
|
||||
ivSpec = paramsEng.engineGetParameterSpec(IvParameterSpec.class);
|
||||
} catch (Exception ex) {
|
||||
InvalidAlgorithmParameterException iape =
|
||||
new InvalidAlgorithmParameterException
|
||||
("Wrong parameter type: IV expected");
|
||||
iape.initCause(ex);
|
||||
throw iape;
|
||||
throw new InvalidAlgorithmParameterException
|
||||
("Wrong parameter type: IV expected", ex);
|
||||
}
|
||||
}
|
||||
engineInit(opmode, key, ivSpec, random);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue