]> source.dussan.org Git - pf4j.git/commitdiff
try to improve logging for DefaultExtensionFinder
authorDecebal Suiu <decebal.suiu@gmail.com>
Thu, 7 Aug 2014 12:18:15 +0000 (15:18 +0300)
committerDecebal Suiu <decebal.suiu@gmail.com>
Thu, 7 Aug 2014 12:18:15 +0000 (15:18 +0300)
pf4j/src/main/java/ro/fortsoft/pf4j/DefaultExtensionFinder.java

index ab726584968b5a5ae203c44e148e5bd3ac11d4df..90b5c542436edca1d39eca95c16efe0041ad0da7 100644 (file)
@@ -68,12 +68,14 @@ public class DefaultExtensionFinder implements ExtensionFinder, PluginStateListe
 
             for (String className : extensionClassNames) {
                 try {
-                    Class<?> extensionClass;
+                    ClassLoader classLoader;
                     if (pluginId != null) {
-                        extensionClass = pluginManager.getPluginClassLoader(pluginId).loadClass(className);
+                        classLoader = pluginManager.getPluginClassLoader(pluginId);
                     } else {
-                        extensionClass = getClass().getClassLoader().loadClass(className);
+                        classLoader = getClass().getClassLoader();
                     }
+                    log.debug("Loading class '{}' using class loader '{}'", className, classLoader);
+                    Class<?> extensionClass = classLoader.loadClass(className);
 
                     log.debug("Checking extension type '{}'", className);
                     if (type.isAssignableFrom(extensionClass) && extensionClass.isAnnotationPresent(Extension.class)) {