1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-13 03:02:22 -05:00

Fix SSLProtocolSocketFactory equals and hashCode to allow pooling

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@216 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2008-12-08 12:53:55 +00:00
parent 463caea397
commit 940fa68372

View File

@ -96,4 +96,20 @@ public class DavGatewaySSLProtocolSocketFactory extends SSLProtocolSocketFactory
throw new IOException(e+" "+e.getMessage()); throw new IOException(e+" "+e.getMessage());
} }
} }
/**
* All instances of SSLProtocolSocketFactory are the same.
*/
@Override
public boolean equals(Object obj) {
return ((obj != null) && obj.getClass().equals(this.getClass()));
}
/**
* All instances of SSLProtocolSocketFactory have the same hash code.
*/
@Override
public int hashCode() {
return this.getClass().hashCode();
}
} }