groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject [groovy] 02/02: Override `toString` methods of lazy nodes
Date Fri, 27 Dec 2019 16:40:21 GMT
This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch GROOVY_2_5_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 2c45abb1991448718901e2e591cf46c0e6c1a530
Author: Daniel Sun <sunlan@apache.org>
AuthorDate: Sat Dec 28 00:39:41 2019 +0800

    Override `toString` methods of lazy nodes
---
 .../codehaus/groovy/ast/decompiled/LazyConstructorNode.java  | 12 ++++++------
 .../org/codehaus/groovy/ast/decompiled/LazyFieldNode.java    |  6 ++++++
 .../org/codehaus/groovy/ast/decompiled/LazyMethodNode.java   | 12 ++++++------
 3 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/src/main/java/org/codehaus/groovy/ast/decompiled/LazyConstructorNode.java b/src/main/java/org/codehaus/groovy/ast/decompiled/LazyConstructorNode.java
index d8e1dd1..b952172 100644
--- a/src/main/java/org/codehaus/groovy/ast/decompiled/LazyConstructorNode.java
+++ b/src/main/java/org/codehaus/groovy/ast/decompiled/LazyConstructorNode.java
@@ -207,12 +207,6 @@ class LazyConstructorNode extends ConstructorNode {
     }
 
     @Override
-    public String toString() {
-        lazyInit();
-        return delegate.toString();
-    }
-
-    @Override
     public void setReturnType(ClassNode returnType) {
         lazyInit();
         delegate.setReturnType(returnType);
@@ -450,4 +444,10 @@ class LazyConstructorNode extends ConstructorNode {
         lazyInit();
         return delegate.hashCode();
     }
+
+    @Override
+    public String toString() {
+        lazyInit();
+        return delegate.toString();
+    }
 }
diff --git a/src/main/java/org/codehaus/groovy/ast/decompiled/LazyFieldNode.java b/src/main/java/org/codehaus/groovy/ast/decompiled/LazyFieldNode.java
index 54c59f6..0261b9e 100644
--- a/src/main/java/org/codehaus/groovy/ast/decompiled/LazyFieldNode.java
+++ b/src/main/java/org/codehaus/groovy/ast/decompiled/LazyFieldNode.java
@@ -405,4 +405,10 @@ class LazyFieldNode extends FieldNode {
         lazyInit();
         return delegate.hashCode();
     }
+
+    @Override
+    public String toString() {
+        lazyInit();
+        return delegate.toString();
+    }
 }
diff --git a/src/main/java/org/codehaus/groovy/ast/decompiled/LazyMethodNode.java b/src/main/java/org/codehaus/groovy/ast/decompiled/LazyMethodNode.java
index 6c4c63e..97be134 100644
--- a/src/main/java/org/codehaus/groovy/ast/decompiled/LazyMethodNode.java
+++ b/src/main/java/org/codehaus/groovy/ast/decompiled/LazyMethodNode.java
@@ -203,12 +203,6 @@ class LazyMethodNode extends MethodNode {
     }
 
     @Override
-    public String toString() {
-        lazyInit();
-        return delegate.toString();
-    }
-
-    @Override
     public void setReturnType(ClassNode returnType) {
         lazyInit();
         delegate.setReturnType(returnType);
@@ -446,4 +440,10 @@ class LazyMethodNode extends MethodNode {
         lazyInit();
         return delegate.hashCode();
     }
+
+    @Override
+    public String toString() {
+        lazyInit();
+        return delegate.toString();
+    }
 }


Mime
View raw message