Commit fc0bee4a authored by Guus der Kinderen's avatar Guus der Kinderen

OF-1348: Can't use SortedSet without Comparable items.

This commit fixes a runtime problem caused by SortedSet usage with providers that are not Comparable. By using a different Set implementation, iteration order is predictable, without there being a need for providers being Comparable.
parent 8ddb7988
......@@ -22,8 +22,8 @@ import org.jivesoftware.util.ClassUtils;
import org.jivesoftware.util.JiveGlobals;
import org.xmpp.packet.JID;
import java.util.SortedSet;
import java.util.TreeSet;
import java.util.LinkedHashSet;
import java.util.Set;
/**
* A {@link AuthProviderMapper} that can be used to draw administrative users from another source than the regular, non-
......@@ -113,9 +113,9 @@ public class AuthorizationBasedAuthProviderMapper implements AuthProviderMapper
}
@Override
public SortedSet<AuthProvider> getAuthProviders()
public Set<AuthProvider> getAuthProviders()
{
final SortedSet<AuthProvider> result = new TreeSet<>();
final Set<AuthProvider> result = new LinkedHashSet<>();
result.add( adminProvider );
result.add( userProvider );
......
......@@ -21,8 +21,8 @@ import org.jivesoftware.openfire.admin.AdminManager;
import org.jivesoftware.util.JiveGlobals;
import org.xmpp.packet.JID;
import java.util.SortedSet;
import java.util.TreeSet;
import java.util.LinkedHashSet;
import java.util.Set;
/**
* A {@link UserProviderMapper} that can be used to draw administrative users from another source than the regular, non-
......@@ -101,9 +101,9 @@ public class AuthorizationBasedUserProviderMapper implements UserProviderMapper
}
@Override
public SortedSet<UserProvider> getUserProviders()
public Set<UserProvider> getUserProviders()
{
final SortedSet<UserProvider> result = new TreeSet<>();
final Set<UserProvider> result = new LinkedHashSet<>();
result.add( adminProvider );
result.add( userProvider );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment