fix #8861: case insensitive string comparison for term comparator
authorKatja Luther <k.luther@bgbm.org>
Fri, 6 Mar 2020 08:52:05 +0000 (09:52 +0100)
committerKatja Luther <k.luther@bgbm.org>
Fri, 6 Mar 2020 08:52:59 +0000 (09:52 +0100)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/DefaultTermComparator.java

index 9be427d3e3cda2361fc88234b559acb3e712dba9..a9817cb3239ca374b1fb42324ea0e18de689982e 100644 (file)
@@ -36,7 +36,7 @@ public class DefaultTermComparator<T extends DefinedTermBase> implements Compara
                }
                String label1 = o1.getLabel(CdmStore.getDefaultLanguage()) != null ? o1.getLabel(CdmStore.getDefaultLanguage()) : o1.getTitleCache();
                String label2 = o2.getLabel(CdmStore.getDefaultLanguage()) != null ? o2.getLabel(CdmStore.getDefaultLanguage()) : o2.getTitleCache();
                }
                String label1 = o1.getLabel(CdmStore.getDefaultLanguage()) != null ? o1.getLabel(CdmStore.getDefaultLanguage()) : o1.getTitleCache();
                String label2 = o2.getLabel(CdmStore.getDefaultLanguage()) != null ? o2.getLabel(CdmStore.getDefaultLanguage()) : o2.getTitleCache();
-               int result = label1.compareTo(label2);
+               int result = label1.compareToIgnoreCase(label2);
                if (result == 0){
                    return o1.getUuid().compareTo(o2.getUuid());
                }
                if (result == 0){
                    return o1.getUuid().compareTo(o2.getUuid());
                }