sort states in aggregated descriptions on count - continue
authorKatja Luther <k.luther@bgbm.org>
Fri, 1 Oct 2021 07:11:20 +0000 (09:11 +0200)
committerKatja Luther <k.luther@bgbm.org>
Fri, 1 Oct 2021 07:11:20 +0000 (09:11 +0200)
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/dto/RowWrapperDTO.java

index 1d6a6d0e2407a5038b8341efa54ea1c566e8da08..5371f807c45728dbb0ac42a85c8f81a21e4adc40 100644 (file)
@@ -121,7 +121,7 @@ public abstract class RowWrapperDTO <T extends DescriptionBase> implements Seria
             Collections.sort(states, new Comparator<StateDataDto>() {
                 @Override
                 public int compare(StateDataDto h1, StateDataDto h2) {
-                    if (h1.getCount() != null && h2.getCount() != null){
+                    if (h1.getCount() != null && h2.getCount() != null && h1.getCount() != h2.getCount()){
                         return -h1.getCount().compareTo(h2.getCount());
                     }
                     return h1.getState().getTitleCache().compareTo(h2.getState().getTitleCache());