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/26 05:35:19 UTC
[groovy] branch danielsun/address-github-actions-errors updated:
Try to fix the failing build
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch danielsun/address-github-actions-errors
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/danielsun/address-github-actions-errors by this push:
new 6bbfbc8 Try to fix the failing build
6bbfbc8 is described below
commit 6bbfbc8794d2223c09779aa7a92b8c2014fd8f27
Author: Daniel Sun <su...@apache.org>
AuthorDate: Thu Mar 26 13:34:19 2020 +0800
Try to fix the failing build
---
src/main/java/groovy/lang/MetaClassImpl.java | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/src/main/java/groovy/lang/MetaClassImpl.java b/src/main/java/groovy/lang/MetaClassImpl.java
index 141deab..0d37ec2 100644
--- a/src/main/java/groovy/lang/MetaClassImpl.java
+++ b/src/main/java/groovy/lang/MetaClassImpl.java
@@ -1689,14 +1689,19 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
* @throws IllegalStateException if the initialisation is incomplete yet
*/
protected void checkInitalised() {
- if (!isInitialized())
- throw new IllegalStateException(
- "initialize must be called for meta " +
- "class of " + theClass +
- "(" + this.getClass() + ") " +
- "to complete initialisation process " +
- "before any invocation or field/property " +
- "access can be done");
+ if (!isInitialized()) {
+ try {
+ initialize();
+ } catch (Throwable t) {
+ throw new IllegalStateException(
+ "initialize must be called for meta " +
+ "class of " + theClass +
+ "(" + this.getClass() + ") " +
+ "to complete initialisation process " +
+ "before any invocation or field/property " +
+ "access can be done", t);
+ }
+ }
}
/**