]> source.dussan.org Git - pf4j.git/commitdiff
Remove dezactivate ServiceProviderExtensionFinder from DefaultExtensionFinder
authorDecebal Suiu <decebal.suiu@gmail.com>
Sat, 19 Mar 2016 16:19:01 +0000 (18:19 +0200)
committerDecebal Suiu <decebal.suiu@gmail.com>
Sat, 19 Mar 2016 16:19:01 +0000 (18:19 +0200)
pf4j/src/main/java/ro/fortsoft/pf4j/DefaultExtensionFinder.java

index cf8c87bedd49439558edde4a8ab36bec7631b40c..fff72a48e411e17f3e16d56fedf80005f3219e07 100644 (file)
@@ -31,7 +31,8 @@ public class DefaultExtensionFinder implements ExtensionFinder, PluginStateListe
     protected List<ExtensionFinder> finders = new ArrayList<>();
 
        public DefaultExtensionFinder(PluginManager pluginManager) {
-        addDefaults(pluginManager);
+        addExtensionFinder(new LegacyExtensionFinder(pluginManager));
+//        addExtensionFinder(new ServiceProviderExtensionFinder(pluginManager));
     }
 
     @Override
@@ -63,9 +64,10 @@ public class DefaultExtensionFinder implements ExtensionFinder, PluginStateListe
         }
     }
 
-    protected void addDefaults(PluginManager pluginManager) {
-        finders.add(new ServiceProviderExtensionFinder(pluginManager));
-        finders.add(new LegacyExtensionFinder(pluginManager));
+    public DefaultExtensionFinder addExtensionFinder(ExtensionFinder finder) {
+        finders.add(finder);
+
+        return this;
     }
 
 }