Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4955100

confusing exception list for javax.srypto.Cipher.init(...) for null Key

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 5.0
    • docs
    • 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.

      ======================================================================

            Unassigned Unassigned
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: