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 2020/03/28 08:29:59 UTC
[groovy] branch master updated: GROOVY-9485: metaclass is not
initialized
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 6c7b4e1 GROOVY-9485: metaclass is not initialized
6c7b4e1 is described below
commit 6c7b4e193d12fcc793401e0bb9097bca30dd2c65
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sat Mar 28 16:29:42 2020 +0800
GROOVY-9485: metaclass is not initialized
---
src/main/java/org/codehaus/groovy/reflection/CachedClass.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/codehaus/groovy/reflection/CachedClass.java b/src/main/java/org/codehaus/groovy/reflection/CachedClass.java
index 0f4314d..c4740d8 100644
--- a/src/main/java/org/codehaus/groovy/reflection/CachedClass.java
+++ b/src/main/java/org/codehaus/groovy/reflection/CachedClass.java
@@ -379,7 +379,9 @@ public class CachedClass {
if (metaClass.getClass() == MetaClassImpl.class) {
classInfo.setStrongMetaClass(null);
updateSetNewMopMethods(arr);
- classInfo.setStrongMetaClass(new MetaClassImpl(metaClass.getTheClass()));
+ MetaClassImpl mci = new MetaClassImpl(metaClass.getTheClass());
+ mci.initialize();
+ classInfo.setStrongMetaClass(mci);
return;
}