Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_6_X 4afde1ad8 -> d1eba19e0


Trivial refactoring

(cherry picked from commit 4403486)


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/2e5af9af
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/2e5af9af
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/2e5af9af

Branch: refs/heads/GROOVY_2_6_X
Commit: 2e5af9afad87221a8bf8e7c56288ceccb9596a3d
Parents: 4afde1a
Author: sunlan <[email protected]>
Authored: Mon Dec 4 17:10:13 2017 +0800
Committer: sunlan <[email protected]>
Committed: Mon Dec 4 18:42:54 2017 +0800

----------------------------------------------------------------------
 src/main/org/codehaus/groovy/runtime/InvokerHelper.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/2e5af9af/src/main/org/codehaus/groovy/runtime/InvokerHelper.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/runtime/InvokerHelper.java 
b/src/main/org/codehaus/groovy/runtime/InvokerHelper.java
index 0e3b380..890abf2 100644
--- a/src/main/org/codehaus/groovy/runtime/InvokerHelper.java
+++ b/src/main/org/codehaus/groovy/runtime/InvokerHelper.java
@@ -398,8 +398,9 @@ public class InvokerHelper {
         while (i < values.length - 1) {
             if ((values[i] instanceof SpreadMap) && (values[i + 1] instanceof 
Map)) {
                 Map smap = (Map) values[i + 1];
-                for (Object key : smap.keySet()) {
-                    answer.put(key, smap.get(key));
+                for (Object e : smap.entrySet()) {
+                    Map.Entry entry = (Map.Entry) e;
+                    answer.put(entry.getKey(), entry.getValue());
                 }
                 i += 2;
             } else {

Reply via email to