You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2021/01/08 09:42:36 UTC
[groovy] branch master updated: trivial refactor
This is an automated email from the ASF dual-hosted git repository.
paulk 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 9e5609d trivial refactor
9e5609d is described below
commit 9e5609de46902412e2c4e15f28c5d4c7ea71b01a
Author: Paul King <pa...@asert.com.au>
AuthorDate: Fri Jan 8 19:42:16 2021 +1000
trivial refactor
---
src/main/java/groovy/lang/MetaClassImpl.java | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/main/java/groovy/lang/MetaClassImpl.java b/src/main/java/groovy/lang/MetaClassImpl.java
index 63af465..cdf6865 100644
--- a/src/main/java/groovy/lang/MetaClassImpl.java
+++ b/src/main/java/groovy/lang/MetaClassImpl.java
@@ -378,15 +378,13 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
while (iter.hasNext()) {
c = iter.next();
- CachedMethod[] cachedMethods = c.getMethods();
- for (CachedMethod metaMethod : cachedMethods) {
+ for (final CachedMethod metaMethod : c.getMethods()) {
addToAllMethodsIfPublic(metaMethod);
if (!metaMethod.isPrivate() || c == firstGroovySuper)
addMetaMethodToIndex(metaMethod, header);
}
- MetaMethod[] cachedMethods1 = getNewMetaMethods(c);
- for (final MetaMethod method : cachedMethods1) {
+ for (final MetaMethod method : getNewMetaMethods(c)) {
if (!newGroovyMethodsSet.contains(method)) {
newGroovyMethodsSet.add(method);
addMetaMethodToIndex(method, header);
@@ -407,7 +405,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
}
last = header;
- for (CachedMethod metaMethod : c.getMethods()) {
+ for (final CachedMethod metaMethod : c.getMethods()) {
addToAllMethodsIfPublic(metaMethod);
addMetaMethodToIndex(metaMethod, header);
}