From b6b4e3ddc42fcbabcaa784c53f383e098b7c87c7 Mon Sep 17 00:00:00 2001 From: decebals Date: Fri, 3 May 2019 01:18:55 +0300 Subject: [PATCH] Remove unneeded method --- pf4j/src/main/java/org/pf4j/AbstractPluginManager.java | 8 ++++---- pf4j/src/main/java/org/pf4j/PluginWrapper.java | 5 +---- 2 files changed, 5 insertions(+), 8 deletions(-) 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; } -- 2.39.5