changeset 5640:3828bec01c12

RT-34079: Backout Service Loader change - cause issue with SceneBuilder [mhowe]
author mhowe
date Tue, 05 Nov 2013 13:07:00 -0800
parents bb60b5a3afdc
children 58064c5894fa
files modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/bundlers/Bundler.java modules/fxpackager/src/main/resources/META-INF/services/com.sun.javafx.tools.packager.bundlers.Bundler
diffstat 2 files changed, 13 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/bundlers/Bundler.java	Tue Oct 29 12:49:50 2013 -0700
+++ b/modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/bundlers/Bundler.java	Tue Nov 05 13:07:00 2013 -0800
@@ -34,7 +34,6 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
-import java.util.ServiceLoader;
 import java.util.Set;
 
 public abstract class Bundler {
@@ -78,7 +77,18 @@
         }
     };
 
-   private static ServiceLoader<Bundler> bundlerLoader = ServiceLoader.load(Bundler.class);
+    private static final List<Bundler> knownBundlers = new LinkedList<Bundler>();
+
+    static {
+        knownBundlers.add(new WinAppBundler());
+        knownBundlers.add(new MacAppBundler());
+        knownBundlers.add(new WinMsiBundler());
+        knownBundlers.add(new WinExeBundler());
+        knownBundlers.add(new MacDMGBundler());
+        knownBundlers.add(new LinuxAppBundler());
+        knownBundlers.add(new LinuxRPMBundler());
+        knownBundlers.add(new LinuxDebBundler());
+    }
 
     protected void setBuildRoot(File dir) {
         buildRoot = dir;
@@ -97,7 +107,7 @@
 
         Log.verbose("Looking for bundlers for type=" + p.type.toString()
                 + " format=" + (p.bundleFormat.isEmpty() ? "any" : p.bundleFormat.toString()));
-        for (Bundler b: bundlerLoader) {
+        for (Bundler b: knownBundlers) {
             if (verbose) {
                 b.setVerbose(true);
             }
--- a/modules/fxpackager/src/main/resources/META-INF/services/com.sun.javafx.tools.packager.bundlers.Bundler	Tue Oct 29 12:49:50 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-com.sun.javafx.tools.packager.bundlers.LinuxAppBundler
-com.sun.javafx.tools.packager.bundlers.LinuxDebBundler
-com.sun.javafx.tools.packager.bundlers.LinuxRPMBundler
-com.sun.javafx.tools.packager.bundlers.MacAppBundler
-com.sun.javafx.tools.packager.bundlers.MacDMGBundler
-com.sun.javafx.tools.packager.bundlers.WinAppBundler
-com.sun.javafx.tools.packager.bundlers.WinExeBundler
-com.sun.javafx.tools.packager.bundlers.WinMsiBundler
\ No newline at end of file