From 269812669c945616175da7613683b5d9d524b466 Mon Sep 17 00:00:00 2001 From: Decebal Suiu Date: Sat, 27 Jan 2018 23:55:03 +0200 Subject: [PATCH] Before start a plugin check if the plugin is resolved --- pf4j/src/main/java/org/pf4j/AbstractPluginManager.java | 5 +++++ 1 file changed, 5 insertions(+) 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)) { -- 2.39.5