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:16:14 UTC
[groovy] branch master updated: Trivial tweak: invoke method directly
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 c5b3e7ec73 Trivial tweak: invoke method directly
c5b3e7ec73 is described below
commit c5b3e7ec73a41d8471e671b410b26acaa15383f5
Author: Daniel Sun <su...@apache.org>
AuthorDate: Mon Sep 5 21:15:28 2022 +0800
Trivial tweak: invoke method directly
---
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 084632192a..7617f376f3 100644
--- a/src/main/java/groovy/lang/MetaClassImpl.java
+++ b/src/main/java/groovy/lang/MetaClassImpl.java
@@ -1130,7 +1130,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);
}