You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by em...@apache.org on 2021/12/02 20:07:04 UTC

[groovy] branch master updated: small items

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 34ffbd0  small items
34ffbd0 is described below

commit 34ffbd02b16bffff59d4c1e252aeaacf77587d46
Author: Eric Milles <er...@thomsonreuters.com>
AuthorDate: Thu Dec 2 13:58:48 2021 -0600

    small items
---
 src/main/java/groovy/lang/MetaClassImpl.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/main/java/groovy/lang/MetaClassImpl.java b/src/main/java/groovy/lang/MetaClassImpl.java
index 8b1e128..4e2e327 100644
--- a/src/main/java/groovy/lang/MetaClassImpl.java
+++ b/src/main/java/groovy/lang/MetaClassImpl.java
@@ -519,7 +519,8 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
                         int matchingMethod = mopArrayIndex(method);
                         if (matchingMethod >= 0) {
                             methods.set(i, mopMethods[matchingMethod]);
-                        } else if (!useThis && c == method.getDeclaringClass().getTheClass()) {
+                        } else if (!useThis && !(method instanceof NewMetaMethod)
+                                && c == method.getDeclaringClass().getTheClass()) {
                             methods.remove(i--); // not fit for super usage; StackOverflowError
                         }
                     }
@@ -1541,7 +1542,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
         return cacheEntry.method;
     }
 
-    private MetaMethod getSuperMethodWithCaching(final Object[] arguments, final MetaMethodIndex.Entry e) {theClass.getSuperclass();
+    private MetaMethod getSuperMethodWithCaching(final Object[] arguments, final MetaMethodIndex.Entry e) {
         if (e.methodsForSuper == null)
             return null;