groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject [1/4] groovy git commit: Minor refactoring
Date Wed, 06 Dec 2017 12:13:02 GMT
Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_4_X 1c312a50f -> e7ee5ede0


Minor refactoring

(cherry picked from commit 53b2a07)


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

Branch: refs/heads/GROOVY_2_4_X
Commit: e988957c0718bd4edd5df3f3c323821a5dd5c5b4
Parents: 29592e1
Author: sunlan <sunlan@apache.org>
Authored: Sat Dec 2 15:04:56 2017 +0800
Committer: sunlan <sunlan@apache.org>
Committed: Sat Dec 2 16:24:29 2017 +0800

----------------------------------------------------------------------
 src/main/groovy/grape/GrabAnnotationTransformation.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/e988957c/src/main/groovy/grape/GrabAnnotationTransformation.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/grape/GrabAnnotationTransformation.java b/src/main/groovy/grape/GrabAnnotationTransformation.java
index ad76ea2..0bccbbe 100644
--- a/src/main/groovy/grape/GrabAnnotationTransformation.java
+++ b/src/main/groovy/grape/GrabAnnotationTransformation.java
@@ -552,8 +552,9 @@ public class GrabAnnotationTransformation extends ClassCodeVisitorSupport
implem
             // assume gradle syntax
             // see: http://www.gradle.org/latest/docs/userguide/dependency_management.html#sec:how_to_declare_your_dependencies
             Map<String, Object> parts = GrapeUtil.getIvyParts(allstr);
-            for (String key : parts.keySet()) {
-                String value = parts.get(key).toString();
+            for (Map.Entry<String, Object> entry : parts.entrySet()) {
+                String key = entry.getKey();
+                String value = entry.getValue().toString();
                 if (!key.equals("version") || !value.equals("*") || !exclude) {
                     node.addMember(key, constX(value));
                 }


Mime
View raw message