mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +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
|
@ -76,16 +76,10 @@ final class ConstructKeys {
|
|||
encodedKeyAlgorithm +
|
||||
"algorithm");
|
||||
} catch (InvalidKeySpecException ikse2) {
|
||||
InvalidKeyException ike =
|
||||
new InvalidKeyException("Cannot construct public key");
|
||||
ike.initCause(ikse2);
|
||||
throw ike;
|
||||
throw new InvalidKeyException("Cannot construct public key", ikse2);
|
||||
}
|
||||
} catch (InvalidKeySpecException ikse) {
|
||||
InvalidKeyException ike =
|
||||
new InvalidKeyException("Cannot construct public key");
|
||||
ike.initCause(ikse);
|
||||
throw ike;
|
||||
throw new InvalidKeyException("Cannot construct public key", ikse);
|
||||
}
|
||||
|
||||
return key;
|
||||
|
@ -116,16 +110,10 @@ final class ConstructKeys {
|
|||
encodedKeyAlgorithm +
|
||||
"algorithm");
|
||||
} catch (InvalidKeySpecException ikse2) {
|
||||
InvalidKeyException ike =
|
||||
new InvalidKeyException("Cannot construct private key");
|
||||
ike.initCause(ikse2);
|
||||
throw ike;
|
||||
throw new InvalidKeyException("Cannot construct private key", ikse2);
|
||||
}
|
||||
} catch (InvalidKeySpecException ikse) {
|
||||
InvalidKeyException ike =
|
||||
new InvalidKeyException("Cannot construct private key");
|
||||
ike.initCause(ikse);
|
||||
throw ike;
|
||||
throw new InvalidKeyException("Cannot construct private key", ikse);
|
||||
} finally {
|
||||
SharedSecrets.getJavaSecuritySpecAccess().clearEncodedKeySpec(keySpec);
|
||||
if (keyBytes != encodedKey) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue