Groovy
  1. Groovy
  2. GROOVY-4699

Observable List misbehaves when using retainAll with closure

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.7.5
    • Fix Version/s: 1.8.2, 1.9-beta-3, 1.7.11
    • Component/s: groovy-jdk
    • Labels:
      None
    • Environment:
      Eclipse Plugin, Windows 7

      Description

      List liste = new ObservableList<String>()

      liste.add "test"
      liste.add "test2"

      List andereListe = new LinkedList<String>()

      liste.retainAll

      { elem -> andereListe.contains(elem) }

      assert liste.isEmpty()
      ____________________________________________

      This results in:
      ____________________________________________
      Exception in thread "main" Assertion failed:

      assert liste.isEmpty()

       
      false
      [test]
      ____________________________________________

      If the ObservableList is changed to LinkedList, the testcase works.

        Activity

        Simon Harrer created issue -
        Guillaume Delcroix made changes -
        Field Original Value New Value
        Assignee Andres Almiray [ aalmiray ]
        Paul King made changes -
        Fix Version/s 1.9-beta-2 [ 17494 ]
        Fix Version/s 1.8.2 [ 17495 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Andres Almiray [ aalmiray ] Paul King [ paulk ]
        Resolution Fixed [ 1 ]
        Fix Version/s 1.7.11 [ 17244 ]
        Paul King made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12733630 ] Default workflow, editable Closed status [ 12745422 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12971147 ] Default workflow, editable Closed status [ 12978860 ]

          People

          • Assignee:
            Paul King
            Reporter:
            Simon Harrer
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development