groovy-commits mailing list archives

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

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

commit 4b1a6766b7f2cffdb115d1a2b23e8045d4d70fb9
Author: Daniel Sun <sunlan@apache.org>
AuthorDate: Fri Dec 27 22:28:50 2019 +0800

    Override `equals` methods in lazy nodes
    
    (cherry picked from commit 2d30ccbfe554ce1494eb05ed7845d2e19f08acf5)
---
 .../org/codehaus/groovy/ast/decompiled/LazyConstructorNode.java     | 6 ++++++
 src/main/java/org/codehaus/groovy/ast/decompiled/LazyFieldNode.java | 6 ++++++
 .../java/org/codehaus/groovy/ast/decompiled/LazyMethodNode.java     | 6 ++++++
 3 files changed, 18 insertions(+)

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 b2e0eed..437f972 100644
--- a/src/main/java/org/codehaus/groovy/ast/decompiled/LazyConstructorNode.java
+++ b/src/main/java/org/codehaus/groovy/ast/decompiled/LazyConstructorNode.java
@@ -443,6 +443,12 @@ class LazyConstructorNode extends ConstructorNode {
     }
 
     @Override
+    public boolean equals(Object obj) {
+        init();
+        return delegate.equals(obj);
+    }
+
+    @Override
     public <T> T getNodeMetaData(Object key) {
         init();
         return delegate.getNodeMetaData(key);
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 1b513be..0f0aa37 100644
--- a/src/main/java/org/codehaus/groovy/ast/decompiled/LazyFieldNode.java
+++ b/src/main/java/org/codehaus/groovy/ast/decompiled/LazyFieldNode.java
@@ -392,6 +392,12 @@ class LazyFieldNode extends FieldNode {
     }
 
     @Override
+    public boolean equals(Object obj) {
+        init();
+        return delegate.equals(obj);
+    }
+
+    @Override
     public <T> T getNodeMetaData(Object key) {
         init();
         return delegate.getNodeMetaData(key);
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 dc8494d..0874ea4 100644
--- a/src/main/java/org/codehaus/groovy/ast/decompiled/LazyMethodNode.java
+++ b/src/main/java/org/codehaus/groovy/ast/decompiled/LazyMethodNode.java
@@ -439,6 +439,12 @@ class LazyMethodNode extends MethodNode {
     }
 
     @Override
+    public boolean equals(Object obj) {
+        init();
+        return delegate.equals(obj);
+    }
+
+    @Override
     public <T> T getNodeMetaData(Object key) {
         init();
         return delegate.getNodeMetaData(key);


Mime
View raw message