mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8289274: Cleanup unnecessary null comparison before instanceof check in security modules
Reviewed-by: mullan
This commit is contained in:
parent
81ee7d28f8
commit
87aa3ce03e
14 changed files with 54 additions and 94 deletions
|
@ -86,9 +86,8 @@ public sealed class RC2Cipher extends CipherSpi
|
|||
protected void engineInit(int opmode, Key key,
|
||||
AlgorithmParameterSpec params, SecureRandom random)
|
||||
throws InvalidKeyException, InvalidAlgorithmParameterException {
|
||||
if (params != null && params instanceof RC2ParameterSpec) {
|
||||
embeddedCipher.initEffectiveKeyBits
|
||||
(((RC2ParameterSpec)params).getEffectiveKeyBits());
|
||||
if (params instanceof RC2ParameterSpec rc2Spec) {
|
||||
embeddedCipher.initEffectiveKeyBits(rc2Spec.getEffectiveKeyBits());
|
||||
} else {
|
||||
embeddedCipher.initEffectiveKeyBits(0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue