ref #10096 unified taxon node status handling during taxon node comparison (cont...
authorAndreas Müller <a.mueller@bgbm.org>
Tue, 26 Jul 2022 23:04:56 +0000 (01:04 +0200)
committerAndreas Müller <a.mueller@bgbm.org>
Tue, 26 Jul 2022 23:04:56 +0000 (01:04 +0200)
cdmlib-model/src/main/java/eu/etaxonomy/cdm/compare/taxon/TaxonNodeStatusComparator.java

index c46cd2c2dc775871180d9edc9440893a441eb301..d60f3058bd9fec1879c05039fa651404ad6c7ef0 100644 (file)
@@ -46,9 +46,9 @@ public class TaxonNodeStatusComparator implements Comparator<TaxonNodeStatus> {
         if (CdmUtils.nullSafeEqual(status1, status2)){
             return 0;
         }else if (status1 == null){
-            return 1;
+            return -1;  //null status or doubtful should be put on top
         }else if (status2 == null){
-            return -1;
+            return 1;
         }else {
             //for now we use the natural order
             return status1.compareTo(status2);