From bdadc6667ae1e09b2fb062987671f8e70830e3c5 Mon Sep 17 00:00:00 2001 From: dre4merp <40335717+dre4merp@users.noreply.github.com> Date: Fri, 28 Apr 2023 15:41:40 +0800 Subject: Fix #524 (#525) --- demo/app/src/main/java/org/pf4j/demo/DemoPluginFactory.java | 7 +++++-- pf4j/src/main/java/org/pf4j/DefaultPluginFactory.java | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/demo/app/src/main/java/org/pf4j/demo/DemoPluginFactory.java b/demo/app/src/main/java/org/pf4j/demo/DemoPluginFactory.java index 432dceb..bdae2d6 100644 --- a/demo/app/src/main/java/org/pf4j/demo/DemoPluginFactory.java +++ b/demo/app/src/main/java/org/pf4j/demo/DemoPluginFactory.java @@ -15,15 +15,18 @@ */ package org.pf4j.demo; +import java.lang.reflect.Constructor; import org.pf4j.DefaultPluginFactory; import org.pf4j.Plugin; import org.pf4j.PluginWrapper; import org.pf4j.demo.api.PluginContext; - -import java.lang.reflect.Constructor; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; class DemoPluginFactory extends DefaultPluginFactory { + private static final Logger log = LoggerFactory.getLogger(DemoPluginFactory.class); + @Override protected Plugin createInstance(Class pluginClass, PluginWrapper pluginWrapper) { PluginContext context = new PluginContext(pluginWrapper.getRuntimeMode()); diff --git a/pf4j/src/main/java/org/pf4j/DefaultPluginFactory.java b/pf4j/src/main/java/org/pf4j/DefaultPluginFactory.java index 310c791..33cdc55 100644 --- a/pf4j/src/main/java/org/pf4j/DefaultPluginFactory.java +++ b/pf4j/src/main/java/org/pf4j/DefaultPluginFactory.java @@ -29,7 +29,7 @@ import java.lang.reflect.Modifier; */ public class DefaultPluginFactory implements PluginFactory { - protected static final Logger log = LoggerFactory.getLogger(DefaultPluginFactory.class); + private static final Logger log = LoggerFactory.getLogger(DefaultPluginFactory.class); /** * Creates a plugin instance. If an error occurs than that error is logged and the method returns {@code null}. -- cgit v1.2.3