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 07:40:27 UTC
[groovy] branch danielsun1106/address-github-actions-errors-2
updated: Try to fix the failing build - 3
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch danielsun1106/address-github-actions-errors-2
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/danielsun1106/address-github-actions-errors-2 by this push:
new 1d81097 Try to fix the failing build - 3
1d81097 is described below
commit 1d81097b98b9cfe9bc5e4f2ad523ee172f35425d
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sat Mar 28 15:39:00 2020 +0800
Try to fix the failing build - 3
---
src/main/java/org/codehaus/groovy/reflection/ClassInfo.java | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/codehaus/groovy/reflection/ClassInfo.java b/src/main/java/org/codehaus/groovy/reflection/ClassInfo.java
index 2598038..a26b719 100644
--- a/src/main/java/org/codehaus/groovy/reflection/ClassInfo.java
+++ b/src/main/java/org/codehaus/groovy/reflection/ClassInfo.java
@@ -265,9 +265,19 @@ public class ClassInfo implements Finalizable {
// safe value here to avoid multiple reads with possibly
// differing values due to concurrency
MetaClass strongMc = strongMetaClass;
- if (strongMc!=null) return strongMc;
+ if (strongMc!=null) {
+ if (strongMc.getClass() == MetaClassImpl.class && ((MetaClassImpl) strongMc).getTheClass() == System.class && !((MetaClassImpl) strongMc).isInitialized()) {
+ throw new GroovyBugError("5: " + strongMc);
+ }
+
+ return strongMc;
+ }
MetaClass weakMc = getWeakMetaClass();
if (isValidWeakMetaClass(weakMc)) {
+ if (weakMc.getClass() == MetaClassImpl.class && ((MetaClassImpl) weakMc).getTheClass() == System.class && !((MetaClassImpl) weakMc).isInitialized()) {
+ throw new GroovyBugError("6: " + weakMc);
+ }
+
return weakMc;
}
return null;