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

Investigate testing of sort operation over data collections.

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8
    • javafx
    • None

      Alexander filed a bug : RT-28090.

      He applied a sort operation over collection of data:

      FXCollections.sort(chart.getData(), new Comparator<Data>() {

                                  @Override
                                  public int compare(Data o1, Data o2) {
                                      return Double.compare(o1.getPieValue(), o2.getPieValue());
                                  }
                              });

      and found a bug (exception):
      java.lang.IllegalArgumentException: Children: duplicate children added: parent = Chart$1@6a97e765[styleClass=chart-content]

      Originally, issue appeared, when data was in a tableView, and a sort of column was applied, so that lead to sort of data, which is tracked by chart.

      Looks like, this case should be tested for all controls, which have a collection of data, as a served data. Among them: ListView, TreeView (TreeItem), TableView, TreeTableView, ChoiceBox, ComboBox, all Charts, Accordion, Menu, MenuBar, TabPane, ToolBar.

      I expect, that if control has a collection, then sort of that collection should be tested, and it could be done via junit tests. So, I expect junit tests, where it is applicable.

            Unassigned Unassigned
            akirov Alexander Kirov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported: