| If you set a SortBy.DESCENDING order on a Query the returned features are sorted in ASCENDING order. Adding this to gt-main/src/test/java/org/geotools/data/collection/SortedFeatureCollectionTest.java demonstrates the issue. public void testSortAttributeDescending() throws Exception { SortBy sort = ff.sort("someAtt", SortOrder.DESCENDING); SortedSimpleFeatureCollection sorted = new SortedSimpleFeatureCollection(delegate, new SortBy[] { sort } ); checkSorted(sorted, DataUtilities.sortComparator(sort)); } |