You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Christofer Dutz <ch...@c-ware.de> on 2016/07/15 17:04:42 UTC

AW: git commit: [flex-falcon] [refs/heads/featue/flexjs-ant-tasks] - fix FB integration when stringifying certain errors

I thought I should merge that back to develop, which I did ...

Should I merge that back to develop?


Chris

________________________________
Von: aharui@apache.org <ah...@apache.org>
Gesendet: Freitag, 15. Juli 2016 18:13:43
An: commits@flex.apache.org
Betreff: git commit: [flex-falcon] [refs/heads/featue/flexjs-ant-tasks] - fix FB integration when stringifying certain errors

Repository: flex-falcon
Updated Branches:
  refs/heads/featue/flexjs-ant-tasks eae9b76c0 -> a180e1e07


fix FB integration when stringifying certain errors


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

Branch: refs/heads/featue/flexjs-ant-tasks
Commit: a180e1e07f9c917948a467ed86d0ce2c294dc126
Parents: eae9b76
Author: Alex Harui <ah...@apache.org>
Authored: Fri Jul 15 09:13:31 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Jul 15 09:13:31 2016 -0700

----------------------------------------------------------------------
 .../main/java/flex2/tools/oem/Application.java  | 22 ++------------------
 1 file changed, 2 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/a180e1e0/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 0edb796..5c5cfe5 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
@@ -34,6 +34,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 import org.apache.flex.compiler.clients.MXMLC;
+import org.apache.flex.compiler.clients.problems.ProblemFormatter;
 import org.apache.flex.compiler.clients.problems.ProblemQuery;
 import org.apache.flex.compiler.problems.CompilerProblemSeverity;
 import org.apache.flex.compiler.problems.ICompilerProblem;
@@ -708,16 +709,7 @@ public class Application implements Builder
                                                     prob.getColumn());
                     try
                     {
-                        String errText = (String) aClass.getField("DESCRIPTION").get(aClass);
-                        while (errText.contains("${"))
-                        {
-                            int start = errText.indexOf("${");
-                            int end = errText.indexOf("}", start);
-                            String token = errText.substring(start + 2, end);
-                            String value = (String) aClass.getField(token).get(prob);
-                            token = "${" + token + "}";
-                            errText = errText.replace(token, value);
-                        }
+                        String errText = ProblemFormatter.DEFAULT_FORMATTER.format(prob);
                         msg.setMessage(errText);
                     }
                     catch (IllegalArgumentException e1)
@@ -730,16 +722,6 @@ public class Application implements Builder
                         // TODO Auto-generated catch block
                         e1.printStackTrace();
                     }
-                    catch (IllegalAccessException e1)
-                    {
-                        // TODO Auto-generated catch block
-                        e1.printStackTrace();
-                    }
-                    catch (NoSuchFieldException e1)
-                    {
-                        // TODO Auto-generated catch block
-                        e1.printStackTrace();
-                    }

                     messages.add(msg);
                     try