Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-10398

LazyFieldNode never equals itself

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.9
    • 3.0.10, 4.0.0-rc-2
    • ast builder
    • None

    Description

      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

      Attachments

        Activity

          People

            paulk Paul King
            Schlogen James Kleeh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 40m
                40m