[
https://issues.apache.org/jira/browse/GROOVY-10398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul King closed GROOVY-10398.
------------------------------
> LazyFieldNode never equals itself
> ---------------------------------
>
> Key: GROOVY-10398
> URL: https://issues.apache.org/jira/browse/GROOVY-10398
> Project: Groovy
> Issue Type: Bug
> Components: ast builder
> Affects Versions: 3.0.9
> Reporter: James Kleeh
> Assignee: Paul King
> Priority: Major
> Fix For: 3.0.10, 4.0.0-rc-2
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> Assume you have a LazyFieldNode instance
> LazyFieldNode node = ...
> List nodes = [node]
> `nodes.contains(node)` -> this will return false
>
> This is because the `equals` method that `LazyFieldNode` implements compares
> the object to the delegate instead of itself so a lazy field node can never
> equal itself
--
This message was sent by Atlassian Jira
(v8.20.1#820001)