]> source.dussan.org Git - pf4j.git/commitdiff
Before start a plugin check if the plugin is resolved
authorDecebal Suiu <decebal.suiu@gmail.com>
Sat, 27 Jan 2018 21:55:03 +0000 (23:55 +0200)
committerDecebal Suiu <decebal.suiu@gmail.com>
Sat, 27 Jan 2018 21:55:03 +0000 (23:55 +0200)
pf4j/src/main/java/org/pf4j/AbstractPluginManager.java

index f24799849086c0d32069d8ac7f4b9e1530bdddd2..43a69ba73332f25af2327acf58249ea5be97259f 100644 (file)
@@ -350,6 +350,11 @@ public abstract class AbstractPluginManager implements PluginManager {
             return PluginState.STARTED;
         }
 
+        if (!resolvedPlugins.contains(pluginWrapper)) {
+            log.warn("Cannot start an unresolved plugin '{}'", getPluginLabel(pluginDescriptor));
+            return pluginState;
+        }
+        
         if (PluginState.DISABLED == pluginState) {
             // automatically enable plugin on manual plugin start
             if (!enablePlugin(pluginId)) {