hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1044526 - in /httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http: HttpHost.java message/BasicHeaderElement.java message/BasicNameValuePair.java
Date Fri, 10 Dec 2010 22:49:46 GMT
Author: sebb
Date: Fri Dec 10 22:49:45 2010
New Revision: 1044526

URL: http://svn.apache.org/viewvc?rev=1044526&view=rev
Log:
No point checking for null, as instanceof else clause handles it

Modified:
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HttpHost.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderElement.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicNameValuePair.java

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HttpHost.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HttpHost.java?rev=1044526&r1=1044525&r2=1044526&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HttpHost.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HttpHost.java Fri
Dec 10 22:49:45 2010
@@ -187,7 +187,6 @@ public final class HttpHost implements C
 
 
     public boolean equals(final Object obj) {
-        if (obj == null) return false;
         if (this == obj) return true;
         if (obj instanceof HttpHost) {
             HttpHost that = (HttpHost) obj;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderElement.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderElement.java?rev=1044526&r1=1044525&r2=1044526&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderElement.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderElement.java
Fri Dec 10 22:49:45 2010
@@ -115,7 +115,6 @@ public class BasicHeaderElement implemen
     }
 
     public boolean equals(final Object object) {
-        if (object == null) return false;
         if (this == object) return true;
         if (object instanceof HeaderElement) {
             BasicHeaderElement that = (BasicHeaderElement) object;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicNameValuePair.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicNameValuePair.java?rev=1044526&r1=1044525&r2=1044526&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicNameValuePair.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicNameValuePair.java
Fri Dec 10 22:49:45 2010
@@ -84,7 +84,6 @@ public class BasicNameValuePair implemen
     }
 
     public boolean equals(final Object object) {
-        if (object == null) return false;
         if (this == object) return true;
         if (object instanceof NameValuePair) {
             BasicNameValuePair that = (BasicNameValuePair) object;



Mime
View raw message