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

Remove "for delegation" in ClassLoader spec

    XMLWordPrintable

Details

    • CSR
    • Resolution: Withdrawn
    • P4
    • tbd
    • core-libs
    • None

    Description

      Summary

      Remove unnecessary "for delegation" phrase from the ClassLoader::getPlatformClassLoader() and ClassLoader::getSystemClassLoader() spec.

      Problem

      The ClassLoader::getParent() spec begins, "Returns the parent class loader for delegation."

      The getPlatformClassLoader() and getSystemClassLoader() static methods in java.lang.ClassLoader are worded similarly. But it seems unnecessary to mention "for delegation" -these methods are designed simply to always return the indicated classloader (for delegation, or no). The "for delegation" phrase seems out of place.

      Solution

      The spec for getPlatformClassLoader() and getSystemClassLoader() can be made more concise by omitting "for delegation" from the method summary.

      Specification

      src/java.base/share/classes/java/lang/ClassLoader.java:

           /**
      -     * Returns the platform class loader for delegation.  All
      +     * Returns the platform class loader.  All
            * <a href="#builtinLoaders">platform classes</a> are visible to
            * the platform class loader.
            * ...
            */
          public static ClassLoader getPlatformClassLoader()
      
           /**
      -     * Returns the system class loader for delegation.  This is the default
      +     * Returns the system class loader.  This is the default
            * delegation parent for new {@code ClassLoader} instances, and is
            * typically the class loader used to start the application.
            * ...
            * the application module path then the class path defaults to
            * the current working directory.
            *
      -     * @return  The system {@code ClassLoader} for delegation
      +     * @return  The system {@code ClassLoader}
            * ...
            */
      public static ClassLoader getSystemClassLoader()

      Attachments

        Issue Links

          Activity

            People

              bchristi Brent Christian
              martin Martin Buchholz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: