RFR: 8002070 Remove the stack search for a resource bundle for Logger to use

Mandy Chung mandy.chung at oracle.com
Fri Mar 1 22:48:51 UTC 2013

On 3/1/2013 1:25 PM, Jim Gish wrote:
> Please review 
> http://cr.openjdk.java.net/~jgish/Bug8002070-RemoveResourceBundleStackSearch/ 
> This removes the stack search from Logger.findResourceBundle()

It's good to see this stack walk search of resource bundle going away.

In Logger.java, the existing implementation returns the previous cached 
resource bundle if it fails to find one matching the current locale but 
the name matches:

1608         if (name.equals(catalogName)) {
1609             // Return the previous cached value for that name.
1610             // This may be null.
1611             return catalog;
1612         }

Your fix removes these lines which I think is fine.  The 
Logger.getResourceBundle method specifies to return the resource bundle 
for this logger for the current default locale.  I think it'd be rare to 
change the default locale during the execution of an application.

I suggest to document this behavioral change as well in the bug report 
and CCC.


More information about the core-libs-dev mailing list