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 2022/09/05 13:17:44 UTC
[groovy] branch GROOVY_4_0_X updated: Trivial tweak: invoke method directly
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY_4_0_X by this push:
new 46094981fe Trivial tweak: invoke method directly
46094981fe is described below
commit 46094981fe5131dbbb2ee25f2452e34578dff393
Author: Daniel Sun <su...@apache.org>
AuthorDate: Mon Sep 5 21:15:28 2022 +0800
Trivial tweak: invoke method directly
(cherry picked from commit c5b3e7ec73a41d8471e671b410b26acaa15383f5)
---
src/main/java/groovy/lang/MetaClassImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/groovy/lang/MetaClassImpl.java b/src/main/java/groovy/lang/MetaClassImpl.java
index cabc9c09ac..5eb722a513 100644
--- a/src/main/java/groovy/lang/MetaClassImpl.java
+++ b/src/main/java/groovy/lang/MetaClassImpl.java
@@ -1129,7 +1129,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
if (methodName.equals("clone") && arguments.length == 0) {
try {
- return (Object) ObjectUtil.getCloneObjectMethodHandle().invokeExact((Object) object);
+ return ObjectUtil.cloneObject(object);
} catch (Throwable t) {
throw new GroovyRuntimeException(t);
}