diff --git a/smack-core/src/main/java/org/jivesoftware/smack/SASLAuthentication.java b/smack-core/src/main/java/org/jivesoftware/smack/SASLAuthentication.java index 5cc8f5dcd..ff22d3790 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/SASLAuthentication.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/SASLAuthentication.java @@ -34,9 +34,9 @@ import javax.security.auth.callback.CallbackHandler; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; -import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Set; @@ -90,7 +90,7 @@ public final class SASLAuthentication { * @return the registered SASLMechanism sorted by the level of preference. */ public static Map getRegisterdSASLMechanisms() { - Map answer = new HashMap(); + Map answer = new LinkedHashMap(); synchronized (REGISTERED_MECHANISMS) { for (SASLMechanism mechanism : REGISTERED_MECHANISMS) { answer.put(mechanism.getClass().getName(), mechanism.getName());