fix #6570: sort ranks in reverse order
authorKatja Luther <k.luther@bgbm.org>
Thu, 4 May 2017 07:27:59 +0000 (09:27 +0200)
committerKatja Luther <k.luther@bgbm.org>
Thu, 4 May 2017 07:27:59 +0000 (09:27 +0200)
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/entitycreator/NameCreator.java

index 98458d1b5d2bf4f089516f097166cb2087deb003..eaa6bafd96f2af3b653d0cf2d468caab5714e90a 100644 (file)
@@ -9,6 +9,7 @@
 
 package eu.etaxonomy.taxeditor.bulkeditor.input.entitycreator;
 
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
@@ -62,6 +63,7 @@ public class NameCreator implements IEntityCreator<TaxonNameBase> {
     public Map<Object, String> getKeyLabelPairs() {
                Map<Object, String> result = new TreeMap<Object, String>();
                List<Rank> ranks = CdmStore.getTermManager().getPreferredTerms(Rank.class);
+               Collections.reverse(ranks);
                for (Rank rank : ranks) {
                        result.put(rank, rank.getLabel());
                }