This is an automated email from the ASF dual-hosted git repository.

joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit 8bfa0cde1eeba3810b053bd0d6363a915e93e879
Author: Josh Tynjala <joshtynj...@apache.org>
AuthorDate: Wed Mar 25 09:21:35 2020 -0700

    Revert "JSClosureCompilerWrapper: avoid duplicate rename mappings"
    
    This reverts commit 0cae7f16b7b8f8256a5b754b517abbc7d9f08e16.
---
 .../compiler/utils/JSClosureCompilerWrapper.java   | 28 +++++++++-------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git 
a/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java
 
b/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java
index cb6b644..382f78b 100644
--- 
a/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java
+++ 
b/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java
@@ -156,6 +156,17 @@ public class JSClosureCompilerWrapper
         }
         
         Map<String, String> propertyMap = null;
+        if (propertyNamesToKeep != null)
+        {
+            if (propertyMap == null)
+            {
+                propertyMap = new HashMap<String, String>();
+            }
+            for (String name : propertyNamesToKeep)
+            {
+                propertyMap.put(name, name);
+            }
+        }
         if (propertyMapInputPath != null)
         {
             if (propertyMap == null)
@@ -171,23 +182,6 @@ public class JSClosureCompilerWrapper
                                e.printStackTrace();
                        }
         }
-        if (propertyNamesToKeep != null)
-        {
-            if (propertyMap == null)
-            {
-                propertyMap = new HashMap<String, String>();
-            }
-            for (String name : propertyNamesToKeep)
-            {
-                //if the propertyMapInputPath has already used this name, we
-                //aren't allowed to add a duplicate.
-                //should there be a warning when there's a duplicate? -JT
-                if (!propertyMap.containsValue(name))
-                {
-                    propertyMap.put(name, name);
-                }
-            }
-        }
         if (propertyMap != null)
         {
             VariableMap map = VariableMap.fromMap(propertyMap);

Reply via email to