From 743875048abd2577f8cb1558e2e618efeef38b74 Mon Sep 17 00:00:00 2001 From: Jeremy Bauer Date: Mon, 13 May 2013 01:43:45 +0000 Subject: [PATCH] Refrain from logging if verifying log factory plugin. git-svn-id: https://svn.apache.org/repos/asf/openjpa/branches/1.1.x@1481682 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/openjpa/lib/conf/PluginValue.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/PluginValue.java b/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/PluginValue.java index 4b220204b..197aa4e79 100644 --- a/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/PluginValue.java +++ b/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/PluginValue.java @@ -20,6 +20,7 @@ package org.apache.openjpa.lib.conf; import org.apache.commons.lang.StringUtils; import org.apache.openjpa.lib.log.Log; +import org.apache.openjpa.lib.log.LogFactory; import org.apache.openjpa.lib.util.Localizer; import org.apache.openjpa.lib.util.ParseException; @@ -105,7 +106,8 @@ public class PluginValue extends ObjectValue { // ensure plugin value is compatible with plugin type if (obj != null && !type.isAssignableFrom(obj.getClass())) { - Log log = (conf == null) ? null : conf.getConfigurationLog(); + Log log = (conf == null || type.equals(LogFactory.class)) + ? null : conf.getConfigurationLog(); String msg = getIncompatiblePluginMessage(obj, type); if (log != null && log.isErrorEnabled()) { log.error(msg);