I had a problem sorting a tree, by using
HierarchicalContainer.sort
.
the code of this method is
[code]
@Override
protected void doSort() {
super.doSort();
Collections.sort(roots, getItemSorter());
for (LinkedList<Object> childList : children.values()) {
Collections.sort(childList, getItemSorter());
}
}
[/code]I do not understand the call to super (so the
IndexedContaioner
implementation), as it will sort all items, whether or not they do have a ‘brother’ relation ship.
looks to me more like a bug, as it is completly useless, but I may have miss something.
Thanks