7163898: add isLoggable() check to doLog()
authoranthony
Tue, 24 Apr 2012 19:12:47 +0400
changeset 12526 c4838d55279c
parent 12525 93404c8fc9e6
child 12527 22abaf748b5b
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>
jdk/src/share/classes/sun/util/logging/PlatformLogger.java
--- 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;