flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [29/50] git commit: [flex-falcon] [refs/heads/dual] - fix second pass handling of FlexJS Dependency list
Date Thu, 13 Apr 2017 17:44:00 GMT
fix second pass handling of FlexJS Dependency list


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

Branch: refs/heads/dual
Commit: ed270e2a425e74e0a9ab1a2abedc0ee6b2220a8b
Parents: fc1fa43
Author: Alex Harui <aharui@apache.org>
Authored: Sat Mar 25 11:01:25 2017 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Sat Mar 25 11:01:25 2017 -0700

----------------------------------------------------------------------
 .../compiler/internal/graph/GoogDepsWriter.java | 58 ++++++++++----------
 1 file changed, 29 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/ed270e2a/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 6d99aac..87a627d 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
@@ -578,42 +578,42 @@ public class GoogDepsWriter {
 						        		}
 						        		else
 						        		{
-						        			String token = JSGoogEmitterTokens.FLEXJS_DEPENDENCY_LIST.getToken();
+						        			String token = JSGoogEmitterTokens.FLEXJS_STATIC_DEPENDENCY_LIST.getToken();
 						    				c = line.indexOf(token);
 						    				if (c > -1)
 						    				{
 						    					c2 = line.indexOf("*/");
 						    					line = line.substring(c + token.length(), c2);
-							        			fi.deps = new ArrayList<String>();
-						    					fi.deps.addAll(Arrays.asList(line.split(",")));
-						    					fi.depsLine = i;
+							        			fi.staticDeps = new ArrayList<String>();
+						    					fi.staticDeps.addAll(Arrays.asList(line.split(",")));
 						    				}
-						    				else if (fi.depsLine == 0)
+						    				else
 						    				{
-						    					token = JSGoogEmitterTokens.GOOG_REQUIRE.getToken();
-						    					c = line.indexOf(token);
-						    					if (c > -1)
-						    					{
-						                            c2 = line.indexOf(")");
-						                            String s = line.substring(c + 14, c2 - 1);
-						                            if (fi.deps == null)
-						                            	fi.deps = new ArrayList<String>();
-						                            fi.deps.add(s);
-						    					}
-						    					else
-						    					{
-								        			token = JSGoogEmitterTokens.FLEXJS_STATIC_DEPENDENCY_LIST.getToken();
-								    				c = line.indexOf(token);
-								    				if (c > -1)
-								    				{
-								    					c2 = line.indexOf("*/");
-								    					line = line.substring(c + token.length(), c2);
-									        			fi.staticDeps = new ArrayList<String>();
-								    					fi.staticDeps.addAll(Arrays.asList(line.split(",")));
-								    				}						    						
-						    					}
-						    				}
-
+							        			token = JSGoogEmitterTokens.FLEXJS_DEPENDENCY_LIST.getToken();
+							    				c = line.indexOf(token);
+							    				if (c > -1)
+							    				{
+							    					c2 = line.indexOf("*/");
+							    					line = line.substring(c + token.length(), c2);
+								        			fi.deps = new ArrayList<String>();
+								        			if (line.length() > 2) // don't add blank or space if no deps
+								        				fi.deps.addAll(Arrays.asList(line.split(",")));
+							    					fi.depsLine = i;
+							    				}
+							    				else if (fi.depsLine == 0)
+							    				{
+							    					token = JSGoogEmitterTokens.GOOG_REQUIRE.getToken();
+							    					c = line.indexOf(token);
+							    					if (c > -1)
+							    					{
+							                            c2 = line.indexOf(")");
+							                            String s = line.substring(c + 14, c2 - 1);
+							                            if (fi.deps == null)
+							                            	fi.deps = new ArrayList<String>();
+							                            fi.deps.add(s);
+							    					}
+							    				}
+							        		}
 						        		}
 					        		}
 					        	}


Mime
View raw message