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

Invalid Change on clear items

    XMLWordPrintable

    Details

      Description

      Introduced by RT-38884 (or not fully fixed): the change fired from selectedItems should contain _only_ the formerly selected items, not all items in the backing list.

          @Test
          public void testInvalidChange_38884() {
              getSelectionModel().select(3);
              int removedSize = getSelectionModel().getSelectedItems().size();
              ListChangeListener l = (Change c) -> {
                  c.next();
                  assertEquals(removedSize, c.getRemovedSize());
              };
              getSelectionModel().getSelectedItems().addListener(l);
              items.clear();
          }

        Attachments

          Activity

            People

            Assignee:
            jgiles Jonathan Giles
            Reporter:
            fastegal Jeanette Winzenburg
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: