<Swing Dev> [9] Review Request: 8149879 Examine UIDefaults::addResourceBundle(String bundleName) with resource encapsulation

Semyon Sadetsky semyon.sadetsky at oracle.com
Wed Nov 30 17:39:07 UTC 2016


On 30.11.2016 20:33, Sergey Bylokhov wrote:

> On 30.11.16 19:55, Semyon Sadetsky wrote:
>>> 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.
>
> The user cannot remove internal bundle from the java.desktop, 
Why user cannot remove it? The method is exported.
> but he can modify the UIDefaults so the data which was loaded from the 
> internal bundle will not be used. The user can:
>  - put key/value pair which override internal data.
>  - register other bundle which override internal bundle.
>  - Clear the list of bundles.
>




More information about the swing-dev mailing list