Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-3319

Getting children of a content with Comparator makes use of TreeSet

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.3.9, 4.4.2, 4.5
    • 4.3.7
    • core
    • None

      The method DefaultContent.getChildren(Content.ContentFilter, String, Comparator) might not want to use TreeSet for ordering child nodes because TreeSet will consider as equal two nodes which are equivalent for the comparator and then will remove one of them. In other words, if the comparator is not fully discriminant, some nodes will be removed.
      A better way would be to use an ArrayList and sort it with Collections.sort(List, Comparator).

        Acceptance criteria

              had Jan Haderka
              vgombert Vincent Gombert
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD