openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1503115 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/plugins/PluginLoader.java
Date Mon, 15 Jul 2013 06:14:41 GMT
Author: rmannibucau
Date: Mon Jul 15 06:14:41 2013
New Revision: 1503115

URL: http://svn.apache.org/r1503115
Log:
OWB plugins can be a proxy so just use toString() instead of simple name of the class when
logging the plugin (otherwise it leads to something useless)

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/plugins/PluginLoader.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/plugins/PluginLoader.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/plugins/PluginLoader.java?rev=1503115&r1=1503114&r2=1503115&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/plugins/PluginLoader.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/plugins/PluginLoader.java
Mon Jul 15 06:14:41 2013
@@ -18,6 +18,7 @@
  */
 package org.apache.webbeans.plugins;
 
+import java.lang.reflect.Proxy;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -77,7 +78,15 @@ public class PluginLoader
             {
                 if (logger.isLoggable(Level.INFO))
                 {
-                    logger.log(Level.INFO, OWBLogConst.INFO_0004, plugin.getClass().getSimpleName());
+                    final Class<? extends OpenWebBeansPlugin> pluginClass = plugin.getClass();
+                    if (!Proxy.isProxyClass(pluginClass))
+                    {
+                        logger.log(Level.INFO, OWBLogConst.INFO_0004, pluginClass.getSimpleName());
+                    }
+                    else
+                    {
+                        logger.log(Level.INFO, OWBLogConst.INFO_0004, plugin.toString());
+                    }
                 }
                 try
                 {



Mime
View raw message