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

UIDefaults.addResourceBundle uses system class loader

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 10
    • client-libs
    • None
    • minimal
    • Java API
    • SE

      Summary

      UIDefaults.addResourceBundle() wrongly uses "application" classloader in the doc wording, whereas it should use "system" classloader

      Problem

      The system class loader can differ to the application class loader when there is a custom system class loader configured, so we should be proper in specifying the correct classloader.

      Solution

      Rectified the doc wording to use "system" classloder

      src/java.desktop/share/classes/javax/swing/UIDefaults.java:

      Specification

        * Adds a resource bundle to the list of resource bundles that are
        * searched for localized values. Resource bundles are searched in
        * the reverse order they were added, using the
        * {@linkplain ClassLoader#getSystemClassLoader system class loader}.
        * In other words, the most recently added bundle is searched first.
        *
        * @param bundleName  the base name of the resource bundle to be added

            psadhukhan Prasanta Sadhukhan
            alanb Alan Bateman
            Alan Bateman, Sergey Bylokhov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: