This is an automated email from the ASF dual-hosted git repository.
emilles pushed a commit to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY_3_0_X by this push:
new cdebd07 avoid extra checks
cdebd07 is described below
commit cdebd078a66295e293bb3f25115f3ca607ff47d6
Author: Eric Milles <[email protected]>
AuthorDate: Thu Nov 26 14:13:17 2020 -0600
avoid extra checks
---
.../codehaus/groovy/runtime/metaclass/MetaMethodIndex.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git
a/src/main/java/org/codehaus/groovy/runtime/metaclass/MetaMethodIndex.java
b/src/main/java/org/codehaus/groovy/runtime/metaclass/MetaMethodIndex.java
index 3bb2c31..0347ce6 100644
--- a/src/main/java/org/codehaus/groovy/runtime/metaclass/MetaMethodIndex.java
+++ b/src/main/java/org/codehaus/groovy/runtime/metaclass/MetaMethodIndex.java
@@ -383,7 +383,7 @@ public class MetaMethodIndex {
return new FastArray(new Object[]{inIndex, toIndex});
}
- if (isOverridden(inIndex, toIndex)) {
+ if (inIndex != toIndex && isOverridden(inIndex, toIndex)) {
return toIndex;
}
return inIndex;
@@ -427,12 +427,12 @@ public class MetaMethodIndex {
private static boolean isNonRealMethod(final MetaMethod method) {
return method instanceof NewInstanceMetaMethod
- || method instanceof NewStaticMetaMethod
- || method instanceof ClosureMetaMethod
- || method instanceof GeneratedMetaMethod
- || method instanceof ClosureStaticMetaMethod
- || method instanceof MixinInstanceMetaMethod
- || method instanceof ClosureMetaMethod.AnonymousMetaMethod;
+ || method instanceof NewStaticMetaMethod
+ || method instanceof ClosureMetaMethod
+ || method instanceof GeneratedMetaMethod
+ || method instanceof ClosureStaticMetaMethod
+ || method instanceof MixinInstanceMetaMethod
+ || method instanceof ClosureMetaMethod.AnonymousMetaMethod;
}
private static boolean isMatchingMethod(final MetaMethod method1, final
MetaMethod method2) {