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

Examine UIDefaults::addResourceBundle(String bundleName) with resource encapsulation

XMLWordPrintable

    • b155
    • Not verified

        UIDefaults::addResourceBundle(String bundleName) is a public API that application can call it to load any resource bundle. This method is also used by the desktop implementation to load its internal resource bundles.

        This method should be examined how to work with modules and with resource encapsulation. Currently there is no way to determine if UIDefaults::addResourceBundle("sun.awt.resources.awt") is called from application or from java.desktop.

        One option is to keep UIDefaults::addResourceBundle method be used only be applications so that it will only load bundles from unnamed module (i.e. classpath). java.desktop can use a private method to register the bundle name to be loaded that it will call ResourceBundle.getBundle(baseName, javaDesktopModule).

              serb Sergey Bylokhov
              mchung Mandy Chung (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: