groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject [groovy] branch GROOVY_2_5_X updated: Avoid using Java8+ API to fix building errors
Date Sat, 29 Jun 2019 14:49:13 GMT
This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch GROOVY_2_5_X
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/GROOVY_2_5_X by this push:
     new cbe67cc  Avoid using Java8+ API to fix building errors
cbe67cc is described below

commit cbe67ccd88173f8752f5d09e0a36209176574714
Author: Daniel Sun <sunlan@apache.org>
AuthorDate: Sat Jun 29 22:48:57 2019 +0800

    Avoid using Java8+ API to fix building errors
---
 src/main/java/org/apache/groovy/ast/tools/ClassNodeUtils.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/groovy/ast/tools/ClassNodeUtils.java b/src/main/java/org/apache/groovy/ast/tools/ClassNodeUtils.java
index ffb6f70..2de1ff9 100644
--- a/src/main/java/org/apache/groovy/ast/tools/ClassNodeUtils.java
+++ b/src/main/java/org/apache/groovy/ast/tools/ClassNodeUtils.java
@@ -163,7 +163,9 @@ public class ClassNodeUtils {
             Map<String, MethodNode> declaredMethods = iface.getDeclaredMethodsMap();
             for (Map.Entry<String, MethodNode> entry : declaredMethods.entrySet())
{
                 if (entry.getValue().getDeclaringClass().isInterface()) {
-                    methodsMap.putIfAbsent(entry.getKey(), entry.getValue());
+                    if (null == methodsMap.get(entry.getKey())) {
+                        methodsMap.put(entry.getKey(), entry.getValue());
+                    }
                 }
             }
         }


Mime
View raw message