hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r159118 - in jakarta/httpclient/trunk/http-common/src/java/org/apache/http: HttpHost.java ProtocolSocketFactory.java
Date Sat, 26 Mar 2005 21:23:37 GMT
Author: olegk
Date: Sat Mar 26 13:23:36 2005
New Revision: 159118

URL: http://svn.apache.org/viewcvs?view=rev&rev=159118
Log:
Minor post SVN-copy tweaks

Modified:
    jakarta/httpclient/trunk/http-common/src/java/org/apache/http/HttpHost.java
    jakarta/httpclient/trunk/http-common/src/java/org/apache/http/ProtocolSocketFactory.java

Modified: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/HttpHost.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/java/org/apache/http/HttpHost.java?view=diff&r1=159117&r2=159118
==============================================================================
--- jakarta/httpclient/trunk/http-common/src/java/org/apache/http/HttpHost.java (original)
+++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/HttpHost.java Sat Mar 26
13:23:36 2005
@@ -37,7 +37,7 @@
  * 
  * @author <a href="mailto:becke@u.washington.edu">Michael Becke</a>
  * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
- * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a>
+ * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  * @author Laura Werner
  * 
  * @since 3.0 
@@ -172,25 +172,14 @@
     /**
      * @see java.lang.Object#equals(java.lang.Object)
      */
-    public boolean equals(final Object o) {
-        
-        if (o instanceof HttpHost) {
-            // shortcut if we're comparing with ourselves
-            if (o == this) { 
-                return true;
-            }
-            HttpHost that = (HttpHost) o;
-            if (!this.hostname.equalsIgnoreCase(that.hostname)) {
-                return false;
-            }
-            if (this.port != that.port) {
-                return false;
-            }
-            if (!this.protocol.equals(that.protocol)) {
-                return false;
-            }
-            // everything matches
-            return true;
+    public boolean equals(final Object obj) {
+        if (obj == null) return false;
+        if (this == obj) return true;
+        if (obj instanceof HttpHost) {
+            HttpHost that = (HttpHost) obj;
+            return this.hostname.equalsIgnoreCase(that.hostname) 
+                && this.port == that.port
+                && this.protocol.equals(that.protocol);
         } else {
             return false;
         }

Modified: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/ProtocolSocketFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/java/org/apache/http/ProtocolSocketFactory.java?view=diff&r1=159117&r2=159118
==============================================================================
--- jakarta/httpclient/trunk/http-common/src/java/org/apache/http/ProtocolSocketFactory.java
(original)
+++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/ProtocolSocketFactory.java
Sat Mar 26 13:23:36 2005
@@ -61,7 +61,7 @@
      * @param port the port on the host
      * @param localAddress the local host name/IP to bind the socket to
      * @param localPort the port on the local machine
-     * @param params {@link HttpConnectionParams Http connection parameters}
+     * @param params {@link HttpParams Http parameters}
      * 
      * @return Socket a new socket
      * 



Mime
View raw message