commit edc8c14e853fcf40fb8a382d1caf84b9bb7287d7
Author: Andreas Müller <a.mueller@bgbm.org>
Date:   Tue Jul 12 17:59:44 2022 +0200

    replace LinkedHashMap by Map where possible

diff --git a/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/dto/RegistrationDTO.java b/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/dto/RegistrationDTO.java
index 8108f76023..b1811f9b6d 100644
--- a/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/dto/RegistrationDTO.java
+++ b/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/dto/RegistrationDTO.java
@@ -12,8 +12,8 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.HashSet;
-import java.util.LinkedHashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
 
@@ -258,7 +258,7 @@ public class RegistrationDTO {
         return name;
     }
 
-    public LinkedHashMap<TypedEntityReference<? extends VersionableEntity>, TypeDesignationWorkingSet> getOrderedTypeDesignationWorkingSets() {
+    public Map<TypedEntityReference<? extends VersionableEntity>, TypeDesignationWorkingSet> getOrderedTypeDesignationWorkingSets() {
         return typeDesignationManager != null ? typeDesignationManager.getOrderedTypeDesignationWorkingSets() : null;
     }
 
diff --git a/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/name/TypeDesignationSetFormatter.java b/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/name/TypeDesignationSetFormatter.java
index f0253eb752..65791b0eb7 100644
--- a/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/name/TypeDesignationSetFormatter.java
+++ b/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/name/TypeDesignationSetFormatter.java
@@ -10,8 +10,8 @@ package eu.etaxonomy.cdm.api.service.name;
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.LinkedHashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.UUID;
 
 import org.apache.commons.lang3.StringUtils;
@@ -94,7 +94,7 @@ public class TypeDesignationSetFormatter {
         }
 
         int typeSetCount = 0;
-        LinkedHashMap<TypedEntityReference<? extends VersionableEntity>, TypeDesignationWorkingSet> orderedByTypesByBaseEntity
+        Map<TypedEntityReference<? extends VersionableEntity>, TypeDesignationWorkingSet> orderedByTypesByBaseEntity
                     = manager.getOrderedTypeDesignationWorkingSets();
         TypeDesignationWorkingSetType lastWsType = null;
         if (orderedByTypesByBaseEntity != null){
@@ -111,7 +111,7 @@ public class TypeDesignationSetFormatter {
     private void buildTaggedTextForSingleTypeSet(TypeDesignationSetManager manager, boolean withBrackets,
             TaggedTextBuilder finalBuilder, int typeSetCount, TypedEntityReference<?> baseEntityRef, TypeDesignationWorkingSetType lastWsType) {
 
-        LinkedHashMap<TypedEntityReference<? extends VersionableEntity>, TypeDesignationWorkingSet>
+        Map<TypedEntityReference<? extends VersionableEntity>, TypeDesignationWorkingSet>
                 orderedByTypesByBaseEntity = manager.getOrderedTypeDesignationWorkingSets();
         TypeDesignationWorkingSet typeDesignationWorkingSet = orderedByTypesByBaseEntity.get(baseEntityRef);
 
@@ -278,7 +278,7 @@ public class TypeDesignationSetFormatter {
      * or if it has a single working set but this workingset has multiple type designations.
      */
     private boolean hasMultipleTypes(
-            LinkedHashMap<TypedEntityReference<? extends VersionableEntity>, TypeDesignationWorkingSet> typeWorkingSets) {
+            Map<TypedEntityReference<? extends VersionableEntity>, TypeDesignationWorkingSet> typeWorkingSets) {
         if (typeWorkingSets == null || typeWorkingSets.isEmpty()){
             return false;
         }else if (typeWorkingSets.keySet().size() > 1) {
diff --git a/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/name/TypeDesignationSetManager.java b/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/name/TypeDesignationSetManager.java
index 99f4ae71a9..ed562e9359 100644
--- a/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/name/TypeDesignationSetManager.java
+++ b/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/name/TypeDesignationSetManager.java
@@ -405,7 +405,7 @@ public class TypeDesignationSetManager {
         return this.typeDesignations.get(uuid);
     }
 
-    public LinkedHashMap<TypedEntityReference<? extends VersionableEntity>, TypeDesignationWorkingSet> getOrderedTypeDesignationWorkingSets() {
+    public Map<TypedEntityReference<? extends VersionableEntity>, TypeDesignationWorkingSet> getOrderedTypeDesignationWorkingSets() {
         return orderedByTypesByBaseEntity;
     }
 
diff --git a/cdmlib-services/src/test/java/eu/etaxonomy/cdm/api/service/name/TypeDesignationSetManagerTest.java b/cdmlib-services/src/test/java/eu/etaxonomy/cdm/api/service/name/TypeDesignationSetManagerTest.java
index cbfc317cda..2496fd79f0 100755
--- a/cdmlib-services/src/test/java/eu/etaxonomy/cdm/api/service/name/TypeDesignationSetManagerTest.java
+++ b/cdmlib-services/src/test/java/eu/etaxonomy/cdm/api/service/name/TypeDesignationSetManagerTest.java
@@ -13,8 +13,8 @@ import static org.junit.Assert.assertNotNull;
 
 import java.util.ArrayList;
 import java.util.Iterator;
-import java.util.LinkedHashMap;
 import java.util.List;
+import java.util.Map;
 
 import org.junit.Assert;
 import org.junit.Before;
@@ -213,7 +213,7 @@ public class TypeDesignationSetManagerTest extends TermTestBase{
                     , result
                     );
 
-            LinkedHashMap<TypedEntityReference<? extends VersionableEntity>, TypeDesignationWorkingSet> orderedTypeDesignations =
+            Map<TypedEntityReference<? extends VersionableEntity>, TypeDesignationWorkingSet> orderedTypeDesignations =
                     typeDesignationManager.getOrderedTypeDesignationWorkingSets();
             Iterator<TypeDesignationWorkingSet> byStatusMapIterator = orderedTypeDesignations.values().iterator();
             Iterator<TypeDesignationStatusBase<?>> keyIt_1 = byStatusMapIterator.next().keySet().iterator();
