diff --git a/services/src/main/java/org/keycloak/truststore/SSLSocketFactory.java b/services/src/main/java/org/keycloak/truststore/SSLSocketFactory.java index 90267bfaea..e8003244c3 100755 --- a/services/src/main/java/org/keycloak/truststore/SSLSocketFactory.java +++ b/services/src/main/java/org/keycloak/truststore/SSLSocketFactory.java @@ -22,6 +22,7 @@ import org.jboss.logging.Logger; import java.io.IOException; import java.net.InetAddress; import java.net.Socket; +import java.util.Comparator; /** @@ -36,7 +37,7 @@ import java.net.Socket; * @author Marko Strukelj */ -public class SSLSocketFactory extends javax.net.ssl.SSLSocketFactory { +public class SSLSocketFactory extends javax.net.ssl.SSLSocketFactory implements Comparator { private static final Logger log = Logger.getLogger(SSLSocketFactory.class); @@ -107,4 +108,8 @@ public class SSLSocketFactory extends javax.net.ssl.SSLSocketFactory { return sslsf.createSocket(); } + @Override + public int compare(Object socketFactory1, Object socketFactory2) { + return socketFactory1.equals(socketFactory2) ? 0 : -1; + } }