From: decebals Date: Thu, 2 May 2019 22:18:55 +0000 (+0300) Subject: Remove unneeded method X-Git-Tag: release-3.0.0~2^2~13 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b6b4e3ddc42fcbabcaa784c53f383e098b7c87c7;p=pf4j.git Remove unneeded method --- diff --git a/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java b/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java index fc0a22e..5a7546e 100644 --- a/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java +++ b/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java @@ -15,6 +15,10 @@ */ package org.pf4j; +import org.pf4j.util.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import java.io.Closeable; import java.io.IOException; import java.nio.file.Files; @@ -27,9 +31,6 @@ import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; -import org.pf4j.util.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * This class implements the boilerplate plugin code that any {@link PluginManager} @@ -820,7 +821,6 @@ public abstract class AbstractPluginManager implements PluginManager { log.debug("Creating wrapper for plugin '{}'", pluginPath); PluginWrapper pluginWrapper = new PluginWrapper(this, pluginDescriptor, pluginPath, pluginClassLoader); pluginWrapper.setPluginFactory(getPluginFactory()); - pluginWrapper.setRuntimeMode(getRuntimeMode()); // test for disabled plugin if (isPluginDisabled(pluginDescriptor.getPluginId())) { diff --git a/pf4j/src/main/java/org/pf4j/PluginWrapper.java b/pf4j/src/main/java/org/pf4j/PluginWrapper.java index 209afb9..a9aa147 100644 --- a/pf4j/src/main/java/org/pf4j/PluginWrapper.java +++ b/pf4j/src/main/java/org/pf4j/PluginWrapper.java @@ -41,6 +41,7 @@ public class PluginWrapper { this.pluginClassLoader = pluginClassLoader; pluginState = PluginState.CREATED; + runtimeMode = pluginManager.getRuntimeMode(); } /** @@ -134,10 +135,6 @@ public class PluginWrapper { this.pluginState = pluginState; } - void setRuntimeMode(RuntimeMode runtimeMode) { - this.runtimeMode = runtimeMode; - } - void setPluginFactory(PluginFactory pluginFactory) { this.pluginFactory = pluginFactory; }