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

Semyon Sadetsky semyon.sadetsky at oracle.com
Thu Dec 1 07:11:55 UTC 2016



On 01.12.2016 02:52, Sergey Bylokhov wrote:
> On 30.11.16 21:12, Semyon Sadetsky wrote:
>> On 30.11.2016 20:51, Sergey Bylokhov wrote:
>>> 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.
>> Interesting. Does it mean that if I register some custom resource bundle
>> it will not affect any UI values because all the values is already
>> cached in some UIDefaults map, is that what you mean?
>
> The cache will be cleared when you register a new bundle.
And if bundle remove the cache is not cleared?
>
>>>
>>>>> 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