Browse Source

Remove unneeded method

pull/320/head
decebals 6 years ago
parent
commit
b6b4e3ddc4
  1. 8
      pf4j/src/main/java/org/pf4j/AbstractPluginManager.java
  2. 5
      pf4j/src/main/java/org/pf4j/PluginWrapper.java

8
pf4j/src/main/java/org/pf4j/AbstractPluginManager.java

@ -15,6 +15,10 @@
*/ */
package org.pf4j; package org.pf4j;
import org.pf4j.util.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.Closeable; import java.io.Closeable;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Files; import java.nio.file.Files;
@ -27,9 +31,6 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; 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} * 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); log.debug("Creating wrapper for plugin '{}'", pluginPath);
PluginWrapper pluginWrapper = new PluginWrapper(this, pluginDescriptor, pluginPath, pluginClassLoader); PluginWrapper pluginWrapper = new PluginWrapper(this, pluginDescriptor, pluginPath, pluginClassLoader);
pluginWrapper.setPluginFactory(getPluginFactory()); pluginWrapper.setPluginFactory(getPluginFactory());
pluginWrapper.setRuntimeMode(getRuntimeMode());
// test for disabled plugin // test for disabled plugin
if (isPluginDisabled(pluginDescriptor.getPluginId())) { if (isPluginDisabled(pluginDescriptor.getPluginId())) {

5
pf4j/src/main/java/org/pf4j/PluginWrapper.java

@ -41,6 +41,7 @@ public class PluginWrapper {
this.pluginClassLoader = pluginClassLoader; this.pluginClassLoader = pluginClassLoader;
pluginState = PluginState.CREATED; pluginState = PluginState.CREATED;
runtimeMode = pluginManager.getRuntimeMode();
} }
/** /**
@ -134,10 +135,6 @@ public class PluginWrapper {
this.pluginState = pluginState; this.pluginState = pluginState;
} }
void setRuntimeMode(RuntimeMode runtimeMode) {
this.runtimeMode = runtimeMode;
}
void setPluginFactory(PluginFactory pluginFactory) { void setPluginFactory(PluginFactory pluginFactory) {
this.pluginFactory = pluginFactory; this.pluginFactory = pluginFactory;
} }

Loading…
Cancel
Save