提交 5c23c10e 编写于 作者: D dfuchs

8041564: Improved management of logger resources

Reviewed-by: skoivu, mchung, igerasim
上级 ce4f1b39
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -1934,6 +1934,9 @@ public class Logger {
}
setCallersClassLoaderRef(callersClass);
if (isSystemLogger && getCallersClassLoader() != null) {
checkPermission();
}
if (findResourceBundle(name, true) == null) {
// We've failed to find an expected ResourceBundle.
// unset the caller's ClassLoader since we were unable to find the
......@@ -2168,11 +2171,13 @@ public class Logger {
return trb;
}
final String rbName = isSystemLogger
? trb.resourceBundleName
// ancestor of a system logger is expected to be a system logger.
// ignore resource bundle name if it's not.
? (target.isSystemLogger ? trb.resourceBundleName : null)
: target.getResourceBundleName();
if (rbName != null) {
return LoggerBundle.get(rbName,
findResourceBundle(rbName, true));
findResourceBundle(rbName, true));
}
target = isSystemLogger ? target.parent : target.getParent();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册