hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HTTPCLIENT-797) o.a.h.conn.scheme.PlainSocketFactory is not a true Singleton
Date Wed, 24 Sep 2008 21:01:45 GMT

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Oleg Kalnichevski resolved HTTPCLIENT-797.

       Resolution: Fixed
    Fix Version/s: 4.0 Beta 2


Actually there is no longer any reason why socket factories need to be implemented as singletons.
This limitation of 3.x API is no longer relevant for 4.0. I updated the javadocs to not mention
singleton anymore.

Many thanks for reporting the problem.


> o.a.h.conn.scheme.PlainSocketFactory is not a true Singleton
> ------------------------------------------------------------
>                 Key: HTTPCLIENT-797
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-797
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.0 Beta 1
>         Environment: N/A
>            Reporter: Jonathan Cottrill
>             Fix For: 4.0 Beta 2
> The class "org.apache.http.conn.scheme.PlainSocketFactory" has a factory method, getSocketFactory(),
and clearly indicates in the Javadocs that it expects to be a Singleton; however, the presence
of public constructors makes it quite possible that this is not the case.
> To protect the Singleton status of the class, the constructors should be private, or,
at the very least, default (package) access. This will force access to the single instance
through the factory method.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message