changeset 5303:9ed029a0326d

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 738b32fc3ef1
children 4a0f6ef43a09
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	Tue Apr 24 17:47:50 2012 +0400
+++ 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;