JDK-8024131 : Issues with cached localizedLevelName in java.util.logging.Level
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util.logging
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-09-02
  • Updated: 2014-02-24
  • Resolved: 2013-09-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
7u60 b01Fixed 8Fixed
Related Reports
Relates :  
Relates :  
This is a regression introduced in 7u13:

A new localizedLevelName field was added to j.u.l.Level, which changed the serial form.
Once set, Level.getLocalizedName() will always return the cached name, regardless of the current locale.

The change in serial form should not introduce any interop issue, because localizedLevelName will be recomputed if null.

The fact that once cached, the localizedLevelName is never recomputed is the more problematic issue.

The fix for that would be to: 1. Declare localizedLevelName transient 2. Add a new transient Locale cachedLocale field to store the locale in which the localizedLevelName was computed. If the current locale does not match the cachedLocale field then the localized level name needs to be recomputed.