-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
5.0
-
Cause Known
-
sparc
-
solaris_2.6
Name: iiR10263 Date: 11/17/2003
The specification requires javax.crypto.Cipher implementation to throw
InvalidKeyException if specified key is inappropriate for
initialization. The above means that if null Key is inappropriate
InvalidKeyException instead of NullPointerException should be thrown.
Unfortunately implementations of some SunJCE Cipher objects throw
NullPointerException. This problem was reported in bug 4953551 but was
closed as "will not fix". It is reasonable to correct specification
in order to make throwing NullPointerException valid.
The problem may be addressed by adding NullPointerExceptin to "Throws"
section of the javax.crypto.Cipher.init(...) methods.
======================================================================
The specification requires javax.crypto.Cipher implementation to throw
InvalidKeyException if specified key is inappropriate for
initialization. The above means that if null Key is inappropriate
InvalidKeyException instead of NullPointerException should be thrown.
Unfortunately implementations of some SunJCE Cipher objects throw
NullPointerException. This problem was reported in bug 4953551 but was
closed as "will not fix". It is reasonable to correct specification
in order to make throwing NullPointerException valid.
The problem may be addressed by adding NullPointerExceptin to "Throws"
section of the javax.crypto.Cipher.init(...) methods.
======================================================================
- duplicates
-
JDK-4955100 confusing exception list for javax.srypto.Cipher.init(...) for null Key
- Closed
- relates to
-
JDK-4953551 NullPointerException for javax.crypto.Cipher.init(int, Key)
- Closed