JCE provider example code incorrect

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 6
    • Affects Version/s: 1.1.8
    • Component/s: 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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: