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

Observable List misbehaves when using retainAll with closure

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.7.5
    • 1.8.2, 1.9-beta-3, 1.7.11
    • groovy-jdk
    • None
    • 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.

      Attachments

        Activity

          People

            paulk Paul King
            sharrer Simon Harrer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: