7163898: add isLoggable() check to doLog()
Summary: Add the check and return immediately if it's false
Reviewed-by: anthony, mchung, sla
Contributed-by: Nicolas Carranza <nicarran@gmail.com>
--- a/jdk/src/share/classes/sun/util/logging/PlatformLogger.java Tue Apr 24 17:47:50 2012 +0400
+++ b/jdk/src/share/classes/sun/util/logging/PlatformLogger.java Tue Apr 24 19:12:47 2012 +0400
@@ -516,6 +516,9 @@
}
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;