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

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

    Details

    • Subcomponent:
    • Understanding:
      Cause Known
    • CPU:
      sparc
    • OS:
      solaris_2.6

      Description

      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.

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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                wetmore Bradford Wetmore
                Reporter:
                duke J. Duke (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Imported:
                  Indexed: