Repository: flex-falcon
Updated Branches:
  refs/heads/develop 5b2f6f68d -> d041f1b8e


Refactored to initialize compilers statically


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/d041f1b8
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/d041f1b8
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/d041f1b8

Branch: refs/heads/develop
Commit: d041f1b8e12c81501b049a98a6b99524759ff8a5
Parents: 5b2f6f6
Author: Frédéric THOMAS <[email protected]>
Authored: Wed Jun 17 14:11:59 2015 +0100
Committer: Frédéric THOMAS <[email protected]>
Committed: Wed Jun 17 14:11:59 2015 +0100

----------------------------------------------------------------------
 flex-compiler-oem/src/flex2/tools/Compc.java | 12 ++++++------
 flex-compiler-oem/src/flex2/tools/Mxmlc.java | 11 +++++------
 2 files changed, 11 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d041f1b8/flex-compiler-oem/src/flex2/tools/Compc.java
----------------------------------------------------------------------
diff --git a/flex-compiler-oem/src/flex2/tools/Compc.java 
b/flex-compiler-oem/src/flex2/tools/Compc.java
index d94e978..44aae0c 100644
--- a/flex-compiler-oem/src/flex2/tools/Compc.java
+++ b/flex-compiler-oem/src/flex2/tools/Compc.java
@@ -27,6 +27,12 @@ import java.lang.reflect.InvocationTargetException;
  * Entry-point for compc, the command-line tool for compiling components.
  */
 public class Compc extends Tool {
+
+    static {
+        COMPILER = COMPC.class;
+        JS_COMPILER = CompJSC.class;
+    }
+
     /**
      * The entry-point for Mxmlc.
      * Note that if you change anything in this method, make sure to check 
Compc, Shell, and
@@ -41,17 +47,11 @@ public class Compc extends Tool {
 
     public static int compcNoExit(String[] args) throws 
InvocationTargetException, NoSuchMethodException, InstantiationException, 
IllegalAccessException {
 
-        COMPILER = COMPC.class;
-        JS_COMPILER = CompJSC.class;
-
         return compile(args);
     }
 
     public static void compc(String[] args) throws InvocationTargetException, 
NoSuchMethodException, InstantiationException, IllegalAccessException {
 
-        COMPILER = COMPC.class;
-        JS_COMPILER = CompJSC.class;
-
         compile(args);
     }
 }

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d041f1b8/flex-compiler-oem/src/flex2/tools/Mxmlc.java
----------------------------------------------------------------------
diff --git a/flex-compiler-oem/src/flex2/tools/Mxmlc.java 
b/flex-compiler-oem/src/flex2/tools/Mxmlc.java
index 93ed8e2..71d271f 100644
--- a/flex-compiler-oem/src/flex2/tools/Mxmlc.java
+++ b/flex-compiler-oem/src/flex2/tools/Mxmlc.java
@@ -47,6 +47,11 @@ public final class Mxmlc extends Tool {
 
     public static final String FILE_SPECS = "file-specs";
 
+    static {
+        COMPILER = MXMLC.class;
+        JS_COMPILER = MxmlJSC.class;
+    }
+
     /**
      * The entry-point for Mxmlc.
      * Note that if you change anything in this method, make sure to check 
Compc, Shell, and
@@ -61,17 +66,11 @@ public final class Mxmlc extends Tool {
 
     public static int mxmlcNoExit(String[] args) throws 
InvocationTargetException, NoSuchMethodException, InstantiationException, 
IllegalAccessException {
 
-        COMPILER = MXMLC.class;
-        JS_COMPILER = MxmlJSC.class;
-
         return compile(args);
     }
 
     public static void mxmlc(String[] args) throws InvocationTargetException, 
NoSuchMethodException, InstantiationException, IllegalAccessException {
 
-        COMPILER = MXMLC.class;
-        JS_COMPILER = MxmlJSC.class;
-
         compile(args);
     }
 

Reply via email to