From 1b623fcf25f791a455948eac425fc0e403f66d36 Mon Sep 17 00:00:00 2001 From: Decebal Suiu Date: Sat, 19 Mar 2016 17:49:01 +0200 Subject: [PATCH] Minor code improvement --- pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginFactory.java b/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginFactory.java index 0ef0e3b..76c2760 100644 --- a/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginFactory.java +++ b/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginFactory.java @@ -60,8 +60,8 @@ public class DefaultPluginFactory implements PluginFactory { // create the plugin instance try { - Constructor constructor = pluginClass.getConstructor(new Class[] { PluginWrapper.class }); - return (Plugin) constructor.newInstance(new Object[] { pluginWrapper }); + Constructor constructor = pluginClass.getConstructor(PluginWrapper.class); + return (Plugin) constructor.newInstance(pluginWrapper); } catch (Exception e) { log.error(e.getMessage(), e); } -- 2.39.5