Details
Description
Apache ISIS own comparator fails with IllegalArgumentException sorting our data. I've created a sample snippet to proof this.
The comparator used in the snippet is that one from ManagedObjects.NATURAL_NULL_FIRST, I've just put for simplicity the complexity of ManagedObject away.
Occured on 2.0.0-M7, but as I checked the code this affects propably all 2.0.0 versions
Stacktrace:
Caused by: java.lang.IllegalArgumentException: Comparison method violates its general contract! at java.util.TimSort.mergeLo(TimSort.java:781) ~[?:?] at java.util.TimSort.mergeAt(TimSort.java:518) ~[?:?] at java.util.TimSort.mergeCollapse(TimSort.java:448) ~[?:?] at java.util.TimSort.sort(TimSort.java:245) ~[?:?] at java.util.Arrays.sort(Arrays.java:1307) ~[?:?] at java.util.ArrayList.sort(ArrayList.java:1721) ~[?:?] at org.apache.isis.commons.collections.Can_Multiple.sorted(Can_Multiple.java:121) ~[isis-commons-2.0.0-M7.jar:2.0.0-M7] at org.apache.isis.viewer.wicket.ui.components.collectioncontents.ajaxtable.CollectionContentsSortableDataProvider.sorted(CollectionContentsSortableDataProvider.java:83) ~[isis-viewer-wicket-ui-2.0.0-M7.jar:2.0.0-M7] at org.apache.isis.viewer.wicket.ui.components.collectioncontents.ajaxtable.CollectionContentsSortableDataProvider.iterator(CollectionContentsSortableDataProvider.java:73) ~[isis-viewer-wicket-ui-2.0.0-M7.jar:2.0.0-M7] at org.apache.wicket.markup.repeater.data.DataViewBase$ModelIterator.<init>(DataViewBase.java:107) ~[wicket-core-8.13.0.jar:8.13.0] at org.apache.wicket.markup.repeater.data.DataViewBase.getItemModels(DataViewBase.java:74) ~[wicket-core-8.13.0.jar:8.13.0] at org.apache.wicket.markup.repeater.AbstractPageableView.getItemModels(AbstractPageableView.java:99) ~[wicket-core-8.13.0.jar:8.13.0] at org.apache.wicket.markup.repeater.RefreshingView.onPopulate(RefreshingView.java:93) ~[wicket-core-8.13.0.jar:8.13.0] at org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:124) ~[wicket-core-8.13.0.jar:8.13.0] at org.apache.wicket.markup.repeater.AbstractPageableView.onBeforeRender(AbstractPageableView.java:113) ~[wicket-core-8.13.0.jar:8.13.0] at org.apache.wicket.Component.beforeRender(Component.java:947) ~[wicket-core-8.13.0.jar:8.13.0] at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1741) ~[wicket-core-8.13.0.jar:8.13.0] ... 107 more
Attachments
Issue Links
- duplicates
-
CAUSEWAY-2969 ManagedObject's NATURAL_NULL_FIRST Comparator cannot handle null well
- Closed