7163898: add isLoggable() check to doLog()

Add the check and return immediately if it's false

Reviewed-by: anthony, mchung, sla
This commit is contained in:
Nicolas Carranza 2012-04-24 19:12:47 +04:00 committed by Anthony Petrov
parent 56a050e73a
commit 2942df6c93

View File

@ -516,6 +516,9 @@ public class PlatformLogger {
}
void doLog(int level, String msg, Object... params) {
if (!isLoggable(level)) {
return;
}
// only pass String objects to the j.u.l.Logger which may
// be created by untrusted code
int len = (params != null) ? params.length : 0;