提交 60857c39 编写于 作者: A anthony

7163898: add isLoggable() check to doLog()

Summary: Add the check and return immediately if it's false
Reviewed-by: anthony, mchung, sla
Contributed-by: NNicolas Carranza <nicarran@gmail.com>
上级 5f3c1f69
...@@ -516,6 +516,9 @@ public class PlatformLogger { ...@@ -516,6 +516,9 @@ public class PlatformLogger {
} }
void doLog(int level, String msg, Object... params) { void doLog(int level, String msg, Object... params) {
if (!isLoggable(level)) {
return;
}
// only pass String objects to the j.u.l.Logger which may // only pass String objects to the j.u.l.Logger which may
// be created by untrusted code // be created by untrusted code
int len = (params != null) ? params.length : 0; int len = (params != null) ? params.length : 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册