You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2021/06/26 07:08:31 UTC
[groovy] branch master updated: Trivial refactoring: simplify code
This is an automated email from the ASF dual-hosted git repository.
sunlan 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 180e201 Trivial refactoring: simplify code
180e201 is described below
commit 180e2018d90b77e6bb4f9c03b3fb98bd61ba873b
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sat Jun 26 15:07:01 2021 +0800
Trivial refactoring: simplify code
---
src/main/java/groovy/lang/MetaClassImpl.java | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/main/java/groovy/lang/MetaClassImpl.java b/src/main/java/groovy/lang/MetaClassImpl.java
index 029deac..23f201b 100644
--- a/src/main/java/groovy/lang/MetaClassImpl.java
+++ b/src/main/java/groovy/lang/MetaClassImpl.java
@@ -1259,10 +1259,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
cacheMethod(clazz, foundMethod);
}
- MethodHandle methodHandle = mhFunc.apply(foundMethod);
- if (null == methodHandle) return null;
-
- return methodHandle;
+ return mhFunc.apply(foundMethod);
}
private static Method doFindMethod(Class clazz, String messageName, Class[] argTypes) {