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

JCE provider example code incorrect

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 1.1.8
    • security-libs
    • rc
    • generic
    • generic

      The document at http://java.sun.com/j2se/1.4.2/docs/guide/security/jce/HowToImplAJCEProvider.html references example source (MyJCE.java) that:

      1) Does not implement the guideline in the "Creating a JarFile Referring to the JAR File" to "prep" the URL:

      // Prep the url with the appropriate protocol.
      jarURL =
          url.getProtocol().equalsIgnoreCase("jar") ?
          url :
          new URL("jar:" + url.toString() + "!/");

      This step is critical on systems for which the "jar:" protocol is not used, such as Oracle's J2EE implementation.

      2) Probably won't compile.
      ###@###.### 2005-04-26 05:09:10 GMT
      ###@###.### 2005-04-27 05:39:48 GMT

            wetmore Bradford Wetmore
            jssunw Jitender S (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: