Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8089169

ListPropertyBase: must not fire changeEvent on modifying the list

    Details

    • Subcomponent:

      Description

      The test below is failing. I would expect:

      - to receive a changeEvent on changing the identity of the list
      - to receive a listChangeEvent on both modifying the list and changing the identity of the list
      - to not receive a changeEvent on modifying a list

      first two expectations seem to be met (as experimented so far) but not the last. Not entirely sure, though, it the expectation is correct. ListProperty isn't used at all internally in the controls related code (which is a pity, would make listening to collection-values properties much cleaner), so no examples to learn from)

          @Test
          public void testListPropertyChangeNotificationOnRemoveItem() {
              ObservableList<String> list = createObservableList(true);
              ListProperty<String> listProperty = new SimpleListProperty<>(list);
              ChangeReport report = new ChangeReport(listProperty);
              list.remove(0);
              assertEquals("listProperty must not fire changeEvent on removing item", 0, report.getEventCount());
          }
          

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                fastegal Jeanette Winzenburg
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Imported: