提交 c5e33d10 编写于 作者: D dfuchs

8042797: Avoid strawberries in LogRecord

Reviewed-by: mchung, skoivu, igerasim
上级 288e8f98
......@@ -513,7 +513,13 @@ public class LogRecord implements java.io.Serializable {
// If necessary, try to regenerate the resource bundle.
if (resourceBundleName != null) {
try {
resourceBundle = ResourceBundle.getBundle(resourceBundleName);
// use system class loader to ensure the ResourceBundle
// instance is a different instance than null loader uses
final ResourceBundle bundle =
ResourceBundle.getBundle(resourceBundleName,
Locale.getDefault(),
ClassLoader.getSystemClassLoader());
resourceBundle = bundle;
} catch (MissingResourceException ex) {
// This is not a good place to throw an exception,
// so we simply leave the resourceBundle null.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册