From 60857c391c453511fea7fdbafe82d4ef0fa3b1a7 Mon Sep 17 00:00:00 2001 From: anthony Date: Tue, 24 Apr 2012 19:12:47 +0400 Subject: [PATCH] 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 --- src/share/classes/sun/util/logging/PlatformLogger.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/share/classes/sun/util/logging/PlatformLogger.java b/src/share/classes/sun/util/logging/PlatformLogger.java index df88de5bd..30700a06b 100644 --- a/src/share/classes/sun/util/logging/PlatformLogger.java +++ b/src/share/classes/sun/util/logging/PlatformLogger.java @@ -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; -- GitLab