Details
-
Bug
-
Status: Resolved
-
Trivial
-
Resolution: Fixed
-
2.0.2-alpha
-
None
-
None
Description
If in SERVER model, the following code should throw exception indicating Factory is in SERVER mode, not in CLIENT mode. Otherwise, it could be confusing.
SSLSocketFactory.java
public SSLSocketFactory createSSLSocketFactory() throws GeneralSecurityException, IOException { if (mode != Mode.CLIENT) { throw new IllegalStateException("Factory is in CLIENT mode"); } return context.getSocketFactory(); }