changeset 6035:edf084032dc3

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>
author anthony
date Tue, 24 Apr 2012 19:12:47 +0400
parents 3e84cc3e444c
children 313b549c79b9
files src/share/classes/sun/util/logging/PlatformLogger.java
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/util/logging/PlatformLogger.java	Fri Apr 19 16:50:10 2013 -0700
+++ b/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;