]> source.dussan.org Git - pf4j.git/commitdiff
Minor code improvement
authorDecebal Suiu <decebal.suiu@gmail.com>
Sat, 19 Mar 2016 15:49:01 +0000 (17:49 +0200)
committerDecebal Suiu <decebal.suiu@gmail.com>
Sat, 19 Mar 2016 15:49:01 +0000 (17:49 +0200)
pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginFactory.java

index 0ef0e3b5172458b2d53b5acde868a28b2cd85622..76c2760a8aa606f48ed9355a306d373250eebf2f 100644 (file)
@@ -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);
         }