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

Document the jdk.net.URLClassPath.showIgnoredClassPathEntries system property

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Approved
    • Fix Version/s: 13
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      No code changes - documenting an existing system property.
    • Interface Kind:
      System or security property
    • Scope:
      JDK

      Description

      Summary

      The jdk.net.URLClassPath.showIgnoredClassPathEntries system property should be documented in the JavaDoc.

      Problem

      The jdk.net.URLClassPath.showIgnoredClassPathEntries system property was added in JDK-8211941 to assist in debugging of invalid Class-Path attributes in JAR file manifests. It will be mentioned in the Release Notes, but should also be mentioned somewhere more accessible - in the JavaDoc.

      Solution

      Problems with an invalid Class-Path entry would turn up during classloading. A reasonable place to document the jdk.net.URLClassPath.showIgnoredClassPathEntries property is in ClassLoader.getSystemClassLoader(), which already has an @implNote describing the use of other classloading-related system properties.

      Using the @systemProperty tag will allow the property name to be found in the JavaDoc search box.

      Specification

      --- a/src/java.base/share/classes/java/lang/ClassLoader.java    Fri Apr 26 12:49:51 2019 -0400
      +++ b/src/java.base/share/classes/java/lang/ClassLoader.java    Mon Apr 29 14:58:54 2019 -0700
      @@ -1893,6 +1893,16 @@
            * otherwise, if unnamed, it will set the class path to the current
            * working directory.
            *
      +     * <p> JAR files on the class path may contain a {@code Class-Path} manifest
      +     * attribute to specify dependent JAR files to be included in the class path.
      +     * {@code Class-Path} entries must meet certain conditions for validity (see
      +     * the <a href="{@docRoot}/../specs/jar/jar.html#class-path-attribute">
      +     * JAR File Specification</a> for details).  Invalid {@code Class-Path}
      +     * entries are ignored.  For debugging purposes, ignored entries can be
      +     * printed to the console if the
      +     * {@systemProperty jdk.net.URLClassPath.showIgnoredClassPathEntries} system
      +     * property is set to {@code true}.
      +     *
              * ...
      public static ClassLoader getSystemClassLoader()

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bchristi Brent Christian
                Reporter:
                bchristi Brent Christian
                Reviewed By:
                Alan Bateman, Mandy Chung
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: