diff options
author | Decebal Suiu <decebal.suiu@gmail.com> | 2016-11-17 00:16:51 +0200 |
---|---|---|
committer | Decebal Suiu <decebal.suiu@gmail.com> | 2016-11-17 00:16:51 +0200 |
commit | d98f23c208bf8474e8fe1de83100a300c48a5263 (patch) | |
tree | bf492aa158db77677e9003bd448f14e5aa04ae3e /pf4j | |
parent | d43d37baf2f57cf17dfc770038688c6a8c189642 (diff) | |
download | pf4j-d98f23c208bf8474e8fe1de83100a300c48a5263.tar.gz pf4j-d98f23c208bf8474e8fe1de83100a300c48a5263.zip |
Fix #116
Diffstat (limited to 'pf4j')
-rw-r--r-- | pf4j/src/main/java/ro/fortsoft/pf4j/AbstractExtensionFinder.java | 8 | ||||
-rw-r--r-- | pf4j/src/main/java/ro/fortsoft/pf4j/Extension.java | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/pf4j/src/main/java/ro/fortsoft/pf4j/AbstractExtensionFinder.java b/pf4j/src/main/java/ro/fortsoft/pf4j/AbstractExtensionFinder.java index ede596a..8332a18 100644 --- a/pf4j/src/main/java/ro/fortsoft/pf4j/AbstractExtensionFinder.java +++ b/pf4j/src/main/java/ro/fortsoft/pf4j/AbstractExtensionFinder.java @@ -50,12 +50,9 @@ public abstract class AbstractExtensionFinder implements ExtensionFinder, Plugin Map<String, Set<String>> entries = getEntries(); List<ExtensionWrapper<T>> result = new ArrayList<>(); - // add extensions found in classpath - List<ExtensionWrapper<T>> classpathExtensions = find(type, null); - result.addAll(classpathExtensions); - - // add extensions found in each plugin + // add extensions found in classpath and plugins for (String pluginId : entries.keySet()) { + // classpath's extensions <=> pluginId = null List<ExtensionWrapper<T>> pluginExtensions = find(type, pluginId); result.addAll(pluginExtensions); } @@ -78,6 +75,7 @@ public abstract class AbstractExtensionFinder implements ExtensionFinder, Plugin log.debug("Finding extensions of extension point '{}' for plugin '{}'", type.getName(), pluginId); List<ExtensionWrapper<T>> result = new ArrayList<>(); + // classpath's extensions <=> pluginId = null Set<String> classNames = findClassNames(pluginId); if (classNames.isEmpty()) { return result; diff --git a/pf4j/src/main/java/ro/fortsoft/pf4j/Extension.java b/pf4j/src/main/java/ro/fortsoft/pf4j/Extension.java index 44ddcb5..eb8234f 100644 --- a/pf4j/src/main/java/ro/fortsoft/pf4j/Extension.java +++ b/pf4j/src/main/java/ro/fortsoft/pf4j/Extension.java @@ -32,6 +32,6 @@ import java.lang.annotation.Target; @Documented public @interface Extension { - int ordinal() default 0; + int ordinal() default 0; } |