<Swing Dev> [9] Review Request: 8149879 Examine UIDefaults::addResourceBundle(String bundleName) with resource encapsulation
Semyon Sadetsky
semyon.sadetsky at oracle.com
Wed Nov 30 16:55:41 UTC 2016
On 30.11.2016 19:34, Sergey Bylokhov wrote:
> On 30.11.16 9:52, Semyon Sadetsky wrote:
>> On 11/28/2016 7:41 PM, Sergey Bylokhov wrote:
>>
>>> Hello.
>>>
>>> Please review the fix for jdk9.
>>>
>>> This fix improve encapsulation of java.desktop module. After the fix
>>> the method "UIDefaults::addResourceBundle()" will not be able to
>>> register resource bundles which are located in the java.desktop
>>> module. Only the java.desktop module itself will be able to use such
>>> bundles.
>> I'm just curios. The UIDefaults::addResourceBundle() violates
>> encapsulation but UIDefaults::removeResourceBundle() doesn't?
>
> The fix changes encapsulation of resources bundles inside java.desktop
> module. The UIDefaults::addResourceBundle() is a way to expose
> internal bundles(if the user requests the internal bundle he will be
> able to read it). The fix does not change the state of UIDefaults, the
> users will be able to register/put/remove everything they want.
I didn't mean state of UIDefaults. I meant loading/unloading of an
internal resources bundle externally.
The fix disables the loading of internal bundle outside the java.desktop
module to improve module encapsulation, but it is still allowed to
remove internal bundle externally. That looks odd.
More information about the swing-dev
mailing list