diff options
author | decebal <decebal.suiu@asf.ro> | 2016-07-01 16:33:06 +0300 |
---|---|---|
committer | decebal <decebal.suiu@asf.ro> | 2016-07-01 16:33:06 +0300 |
commit | c79986c72e1795b060cfc7ff23cf2518d2b17c85 (patch) | |
tree | 36adb4da9ee9fd33aab8002db6edb98fedbd1d73 | |
parent | 33a49849b7834f413c4f1cff0a4c6c03ff7746c7 (diff) | |
download | pf4j-c79986c72e1795b060cfc7ff23cf2518d2b17c85.tar.gz pf4j-c79986c72e1795b060cfc7ff23cf2518d2b17c85.zip |
Minor improvement
-rw-r--r-- | pf4j/src/main/java/ro/fortsoft/pf4j/AbstractExtensionFinder.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/pf4j/src/main/java/ro/fortsoft/pf4j/AbstractExtensionFinder.java b/pf4j/src/main/java/ro/fortsoft/pf4j/AbstractExtensionFinder.java index 8c5553e..1be5b8b 100644 --- a/pf4j/src/main/java/ro/fortsoft/pf4j/AbstractExtensionFinder.java +++ b/pf4j/src/main/java/ro/fortsoft/pf4j/AbstractExtensionFinder.java @@ -30,7 +30,7 @@ import java.util.Set; */ public abstract class AbstractExtensionFinder implements ExtensionFinder, PluginStateListener { - protected static final Logger log = LoggerFactory.getLogger(AbstractExtensionFinder.class); + private static final Logger log = LoggerFactory.getLogger(AbstractExtensionFinder.class); protected PluginManager pluginManager; protected volatile Map<String, Set<String>> entries; // cache by pluginId @@ -60,14 +60,10 @@ public abstract class AbstractExtensionFinder implements ExtensionFinder, Plugin } } + ClassLoader classLoader = (pluginId != null) ? pluginManager.getPluginClassLoader(pluginId) : getClass().getClassLoader(); + for (String className : entry.getValue()) { try { - ClassLoader classLoader; - if (pluginId != null) { - classLoader = pluginManager.getPluginClassLoader(pluginId); - } else { - classLoader = getClass().getClassLoader(); - } log.debug("Loading class '{}' using class loader '{}'", className, classLoader); Class<?> extensionClass = classLoader.loadClass(className); |