better fault tolerance

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

Branch: refs/heads/cordova
Commit: a44c2e7499c99c052e02839c1b0a8eff3c82338e
Parents: 240b190
Author: Alex Harui <[email protected]>
Authored: Sat Jul 1 08:39:18 2017 -0700
Committer: Alex Harui <[email protected]>
Committed: Sat Jul 1 08:39:18 2017 -0700

----------------------------------------------------------------------
 .../org/apache/flex/compiler/clients/MXMLJSC.java    |  5 +++--
 .../src/main/java/flex2/tools/oem/Application.java   | 15 +++++++++++++++
 2 files changed, 18 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/a44c2e74/compiler-jx/src/main/java/org/apache/flex/compiler/clients/MXMLJSC.java
----------------------------------------------------------------------
diff --git 
a/compiler-jx/src/main/java/org/apache/flex/compiler/clients/MXMLJSC.java 
b/compiler-jx/src/main/java/org/apache/flex/compiler/clients/MXMLJSC.java
index 1c72e74..24232bd 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/clients/MXMLJSC.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/clients/MXMLJSC.java
@@ -340,10 +340,11 @@ public class MXMLJSC implements JSCompilerEntryPoint, 
ProblemQueryProvider,
                                result = 
mxmlc.mainCompileOnly(removeJSArgs(args), err);
                            else
                                result = mxmlc.mainNoExit(removeJSArgs(args));
-                           if (result != 0 && result != 2)
+                           if (result != 0)
                            {
                                problems.addAll(mxmlc.problems.getProblems());
-                               break targetloop;
+                               if (problems.hasErrors())
+                                       break targetloop;
                            }
                            break;
                        case JS_FLEX:

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/a44c2e74/flex-compiler-oem/src/main/java/flex2/tools/oem/Application.java
----------------------------------------------------------------------
diff --git a/flex-compiler-oem/src/main/java/flex2/tools/oem/Application.java 
b/flex-compiler-oem/src/main/java/flex2/tools/oem/Application.java
index 11b14aa..642d241 100644
--- a/flex-compiler-oem/src/main/java/flex2/tools/oem/Application.java
+++ b/flex-compiler-oem/src/main/java/flex2/tools/oem/Application.java
@@ -678,6 +678,21 @@ public class Application implements Builder
         List<String> sourceFiles = mxmljsc.getSourceList();
         String mainFile = mxmljsc.getMainSource();
         VirtualFile mainVirtualFile = null;
+        if (sourceFiles == null)
+        {
+               // maybe a config error
+               sourceFiles = new ArrayList<String>();
+               for (VirtualFile f : files)
+               {               
+               sourceFiles.add(f.getName());
+               if (mainFile == null)
+               {
+                       mainFile = f.getName();
+                    int lastSep = mainFile.lastIndexOf(File.separator);
+                    mainFile = mainFile.substring(0, lastSep);
+               }
+               }
+        }
         for (String sourceFile : sourceFiles)
         {
             for (VirtualFile sourcePath : sourcePaths)

Reply via email to