summaryrefslogtreecommitdiffstats
path: root/pf4j/src
diff options
context:
space:
mode:
authorDecebal Suiu <decebal.suiu@gmail.com>2018-01-27 23:55:03 +0200
committerDecebal Suiu <decebal.suiu@gmail.com>2018-01-27 23:55:03 +0200
commit269812669c945616175da7613683b5d9d524b466 (patch)
treef486c4a38191ed8ef53adf39a47caa09c5159bf7 /pf4j/src
parent172d8b9188748d5b6522dcf8324f2d24892664e7 (diff)
downloadpf4j-269812669c945616175da7613683b5d9d524b466.tar.gz
pf4j-269812669c945616175da7613683b5d9d524b466.zip
Before start a plugin check if the plugin is resolved
Diffstat (limited to 'pf4j/src')
-rw-r--r--pf4j/src/main/java/org/pf4j/AbstractPluginManager.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java b/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java
index f247998..43a69ba 100644
--- a/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java
+++ b/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java
@@ -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)) {