hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Cottrill (JIRA)" <j...@apache.org>
Subject [jira] Created: (HTTPCLIENT-797) o.a.h.conn.scheme.PlainSocketFactory is not a true Singleton
Date Tue, 23 Sep 2008 22:09:44 GMT
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


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


Mime
View raw message