hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r698731 - in /httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn: scheme/PlainSocketFactory.java ssl/SSLSocketFactory.java
Date Wed, 24 Sep 2008 20:55:48 GMT
Author: olegk
Date: Wed Sep 24 13:55:47 2008
New Revision: 698731

URL: http://svn.apache.org/viewvc?rev=698731&view=rev
Log:
HTTPCLIENT-797: 
* Removed javadoc comments about PlainSocketFactory having to be a singleton
* Removed overridden PlainSocketFactory#hashCode() and PlainSocketFactory#equals(). PlainSocketFactory
should be using default Object implementation of those methods

Modified:
    httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java
    httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java

Modified: httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java?rev=698731&r1=698730&r2=698731&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java
Wed Sep 24 13:55:47 2008
@@ -48,7 +48,7 @@
 public final class PlainSocketFactory implements SocketFactory {
 
     /**
-     * The factory singleton.
+     * The default factory.
      */
     private static final
         PlainSocketFactory DEFAULT_FACTORY = new PlainSocketFactory();
@@ -56,8 +56,10 @@
     private final HostNameResolver nameResolver;
     
     /**
-     * Gets the singleton instance of this class.
-     * @return the one and only plain socket factory
+     * Gets the default factory. Usually there should be no reason for creating 
+     * multiple instances of this class.
+     * 
+     * @return the default factory
      */
     public static PlainSocketFactory getSocketFactory() {
         return DEFAULT_FACTORY;
@@ -155,28 +157,4 @@
 
     } // isSecure
 
-
-    /**
-     * Compares this factory with an object.
-     * There is only one instance of this class.
-     *
-     * @param obj       the object to compare with
-     *
-     * @return  iff the argument is this object
-     */
-    @Override
-    public boolean equals(Object obj) {
-        return (obj == this);
-    }
-
-    /**
-     * Obtains a hash code for this object.
-     * All instances of this class have the same hash code.
-     * There is only one instance of this class.
-     */
-    @Override
-    public int hashCode() {
-        return PlainSocketFactory.class.hashCode();
-    }
-
 }

Modified: httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java?rev=698731&r1=698730&r2=698731&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java
Wed Sep 24 13:55:47 2008
@@ -150,14 +150,17 @@
     
     public static final X509HostnameVerifier STRICT_HOSTNAME_VERIFIER 
         = new StrictHostnameVerifier();
+
     /**
-     * The factory using the default JVM settings for secure connections.
+     * The default factory using the default JVM settings for secure connections.
      */
     private static final SSLSocketFactory DEFAULT_FACTORY = new SSLSocketFactory();
     
     /**
-     * Gets an singleton instance of the SSLProtocolSocketFactory.
-     * @return a SSLProtocolSocketFactory
+     * Gets the default factory, which uses the default JVM settings for secure 
+     * connections.
+     * 
+     * @return the default factory
      */
     public static SSLSocketFactory getSocketFactory() {
         return DEFAULT_FACTORY;



Mime
View raw message