Skip to main content

Bug in UIDefaults?

1 reply [Last post]
dhirwinjr
Offline
Joined: 2004-07-27

I don't mean to cross-post, but I originally posted a question about loading a resource bundle using the UIDefaults class in the Swing forum but after further testing I believe it may be a bug.

In particular, I've notice that loading a resource bundle using the UIDefaults class in the latest 1.6 build seems to fail. In particular loading a resource bundle directly or through the UIDefaults class as follows:

<br />
// method 1<br />
ResourceBundle bundle = ResourceBundle.getBundle("conf.ActionResources");</p>
<p>// method 2<br />
UIDefaults defaults = new UIDefaults();<br />
defaults.addResourceBundle("conf.ActionResources");<br />

where I have a ActionResources_en.properties file in my conf folder.

Both methods work (as they load the resource bundle) in build 1.5.0_05, but the latter of the two methods fails in build 1.6.0-rc-b70. I didn't find anything similiar searching the current bug list.

Dave

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
alexlamsl
Offline
Joined: 2004-09-02

Reading the Mustang source code your supplied name would be called using getBundle():
[code]
/* could be anything else */
Locale l = Locale.getDefault();

ResourceBundle b = ResourceBundle.getBundle("conf.ActionResources", l, CoreResourceBundleControl.getRBControlInstance());
[/code]

You can try out the code to investigate further; posting more information as to what fails and how helps as well.