Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 604C0200C51 for ; Sun, 26 Mar 2017 06:55:49 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5ED60160B96; Sun, 26 Mar 2017 04:55:49 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8DEB8160B9D for ; Sun, 26 Mar 2017 06:55:48 +0200 (CEST) Received: (qmail 56427 invoked by uid 500); 26 Mar 2017 04:55:47 -0000 Mailing-List: contact commits-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list commits@flex.apache.org Received: (qmail 56388 invoked by uid 99); 26 Mar 2017 04:55:47 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Mar 2017 04:55:47 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 60CD4E08AC; Sun, 26 Mar 2017 04:55:47 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aharui@apache.org To: commits@flex.apache.org Date: Sun, 26 Mar 2017 04:55:50 -0000 Message-Id: <445dd6676cda4b8cbdc8a931d9a70254@git.apache.org> In-Reply-To: <52783c97eff4445bb1b671d68a1d5302@git.apache.org> References: <52783c97eff4445bb1b671d68a1d5302@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [4/5] git commit: [flex-falcon] [refs/heads/develop] - fix second pass handling of FlexJS Dependency list archived-at: Sun, 26 Mar 2017 04:55:49 -0000 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/develop Commit: ed270e2a425e74e0a9ab1a2abedc0ee6b2220a8b Parents: fc1fa43 Author: Alex Harui Authored: Sat Mar 25 11:01:25 2017 -0700 Committer: Alex Harui 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(); - fi.deps.addAll(Arrays.asList(line.split(","))); - fi.depsLine = i; + fi.staticDeps = new ArrayList(); + 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(); - 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(); - 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(); + 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(); + fi.deps.add(s); + } + } + } } } }