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

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Wed Nov 30 17:51:02 UTC 2016


On 30.11.16 20:39, Semyon Sadetsky wrote:
>> The user cannot remove internal bundle from the java.desktop,
> Why user cannot remove it? The method is exported.

Do we talking about UIDefaults.removeResourceBundle()? This method 
removes the name of the bundle from the Vector in UIDefault, so when the 
data will be requested via UIDefaults.get() an internal resource bundle 
will not be used. This method can be used in situations when the 
application/L&F want to remove predefined data for some reason. The 
bundle itself will be available in java.desktop module, and will be 
registered again when some of our l&f will be set.
The purpose of the fix is to encapsulate the java.desktop module itself, 
not the data which were loaded already to the UIDefaults map.

>> 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.
>>
>


-- 
Best regards, Sergey.



More information about the swing-dev mailing list