flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject git commit: [flex-falcon] [refs/heads/develop] - don't do removes from within the iterator
Date Tue, 28 Mar 2017 20:49:28 GMT
Repository: flex-falcon
Updated Branches:
  refs/heads/develop 251672631 -> 7676cf9c7


don't do removes from within the iterator


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

Branch: refs/heads/develop
Commit: 7676cf9c7da9fae567e1548a96fcd3b0816d33e7
Parents: 2516726
Author: Alex Harui <aharui@apache.org>
Authored: Tue Mar 28 13:45:31 2017 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Tue Mar 28 13:49:24 2017 -0700

----------------------------------------------------------------------
 .../internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java       | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/7676cf9c/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
index 560927c..74fa0a5 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
@@ -160,12 +160,17 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
                 .getASEmitter();
 
         String currentClassName = fjs.getModel().getCurrentClass().getQualifiedName();
+        ArrayList<String> removals = new ArrayList<String>();
         for (String usedName : asEmitterUsedNames) {
             //remove any internal component that has been registered with the other emitter's
usedNames
             if (usedName.startsWith(currentClassName+".") && subDocumentNames.contains(usedName.substring(currentClassName.length()+1)))
{
-                asEmitterUsedNames.remove(usedName);
+                removals.add(usedName);
             }
         }
+        for (String usedName : removals)
+        {
+        	asEmitterUsedNames.remove(usedName);
+        }
         System.out.println(currentClassName + " as: " + asEmitterUsedNames.toString());
         System.out.println(currentClassName + " mxml: " + usedNames.toString());
         usedNames.addAll(asEmitterUsedNames);


Mime
View raw message