groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject groovy git commit: Minor refactoring
Date Sat, 02 Dec 2017 07:05:08 GMT
Repository: groovy
Updated Branches:
  refs/heads/master bd1b3bc2c -> 53b2a07ea


Minor refactoring


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

Branch: refs/heads/master
Commit: 53b2a07ea77fd2f5bfd588ad1c9159bb48c5c886
Parents: bd1b3bc
Author: sunlan <sunlan@apache.org>
Authored: Sat Dec 2 15:04:56 2017 +0800
Committer: sunlan <sunlan@apache.org>
Committed: Sat Dec 2 15:04:56 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/53b2a07e/src/main/groovy/grape/GrabAnnotationTransformation.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/grape/GrabAnnotationTransformation.java b/src/main/groovy/grape/GrabAnnotationTransformation.java
index e0b501f..dd55ff9 100644
--- a/src/main/groovy/grape/GrabAnnotationTransformation.java
+++ b/src/main/groovy/grape/GrabAnnotationTransformation.java
@@ -558,8 +558,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