Details
-
Improvement
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
4.3.1
-
None
Description
TrustSelfSignedStrategy should be a singleton, as it happens for several other strategies in HTTP Client. For example,
public class TrustSelfSignedStrategy implements TrustStrategy {
public static final TrustSelfSignedStrategy INSTANCE = new TrustSelfSignedStrategy();
private TrustSelfSignedStrategy() {}
public boolean isTrusted(
final X509Certificate[] chain, final String authType) throws CertificateException
}
Incidentally, I noted that other strategies (e.g., NoConnectionReuseStrategy) have a public constructor, which violates the Singleton design pattern.