diff options
author | Decebal Suiu <decebal.suiu@gmail.com> | 2018-01-27 23:55:03 +0200 |
---|---|---|
committer | Decebal Suiu <decebal.suiu@gmail.com> | 2018-01-27 23:55:03 +0200 |
commit | 269812669c945616175da7613683b5d9d524b466 (patch) | |
tree | f486c4a38191ed8ef53adf39a47caa09c5159bf7 /pf4j/src | |
parent | 172d8b9188748d5b6522dcf8324f2d24892664e7 (diff) | |
download | pf4j-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.java | 5 |
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)) { |