openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jrba...@apache.org
Subject svn commit: r1481688 - in /openjpa/branches/1.0.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf: ConfigurationImpl.java PluginValue.java
Date Mon, 13 May 2013 02:41:06 GMT
Author: jrbauer
Date: Mon May 13 02:41:06 2013
New Revision: 1481688

URL: http://svn.apache.org/r1481688
Log:
Refrain from logging if verifying log factory plugin.

Modified:
    openjpa/branches/1.0.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java
    openjpa/branches/1.0.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/PluginValue.java

Modified: openjpa/branches/1.0.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java?rev=1481688&r1=1481687&r2=1481688&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java
(original)
+++ openjpa/branches/1.0.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java
Mon May 13 02:41:06 2013
@@ -217,7 +217,6 @@ public class ConfigurationImpl
     }
 
     public void setLog(String log) {
-        assertNotReadOnly();
         logFactoryPlugin.setString(log);
     }
 

Modified: openjpa/branches/1.0.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/PluginValue.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/PluginValue.java?rev=1481688&r1=1481687&r2=1481688&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/PluginValue.java
(original)
+++ openjpa/branches/1.0.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/PluginValue.java
Mon May 13 02:41:06 2013
@@ -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;
 
@@ -104,7 +105,8 @@ public class PluginValue extends ObjectV
         
         // 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);



Mime
View raw message