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
1 changed files with 16 additions and 0 deletions

View File

@ -96,4 +96,20 @@ public class DavGatewaySSLProtocolSocketFactory extends SSLProtocolSocketFactory
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();
}
}