don't remove requires for static deps

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

Branch: refs/heads/feature/chart-work
Commit: c5286f512ac2d9addbaccd489451a6e42f47e666
Parents: da2d692
Author: Alex Harui <aha...@apache.org>
Authored: Sun Apr 2 23:26:25 2017 -0700
Committer: Alex Harui <aha...@apache.org>
Committed: Sun Apr 2 23:26:25 2017 -0700

----------------------------------------------------------------------
 .../apache/flex/compiler/internal/graph/GoogDepsWriter.java   | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c5286f51/compiler-jx/src/main/java/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
----------------------------------------------------------------------
diff --git 
a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
 
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
index 9d3439f..6065efc 100644
--- 
a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
+++ 
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
@@ -415,10 +415,11 @@ public class GoogDepsWriter {
                     {
                         int c2 = line.indexOf(")");
                         String s = line.substring(c + 14, c2 - 1);
-                        if (gd.fileInfo.impls == null || 
!gd.fileInfo.impls.contains(s))
+                        if ((gd.fileInfo.impls == null || 
!gd.fileInfo.impls.contains(s)) &&
+                                       (gd.fileInfo.staticDeps == null || 
!gd.fileInfo.staticDeps.contains(s)))
                         {
-                               // don't add the require if some class needs it 
at static initialization
-                               // time and that class is not this class
+                               // don't remove the require if some class needs 
it at static initialization
+                               // time
                                suppressCount++;
                                System.out.println(gd.filePath + " removing 
require: " + s);
                                if (!firstDependency)

Reply via email to