From f5a01c6cb2fcc69b39eddd893a7db787bb75df71 Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Fri, 10 Dec 2010 22:51:44 +0000 Subject: [PATCH] No point checking for null, as instanceof else clause handles it git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1044527 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/http/auth/BasicUserPrincipal.java | 1 - httpclient/src/main/java/org/apache/http/auth/NTCredentials.java | 1 - .../src/main/java/org/apache/http/auth/NTUserPrincipal.java | 1 - .../java/org/apache/http/auth/UsernamePasswordCredentials.java | 1 - 4 files changed, 4 deletions(-) diff --git a/httpclient/src/main/java/org/apache/http/auth/BasicUserPrincipal.java b/httpclient/src/main/java/org/apache/http/auth/BasicUserPrincipal.java index 7e9f3c374..c8094227d 100644 --- a/httpclient/src/main/java/org/apache/http/auth/BasicUserPrincipal.java +++ b/httpclient/src/main/java/org/apache/http/auth/BasicUserPrincipal.java @@ -66,7 +66,6 @@ public final class BasicUserPrincipal implements Principal, Serializable { @Override public boolean equals(Object o) { - if (o == null) return false; if (this == o) return true; if (o instanceof BasicUserPrincipal) { BasicUserPrincipal that = (BasicUserPrincipal) o; diff --git a/httpclient/src/main/java/org/apache/http/auth/NTCredentials.java b/httpclient/src/main/java/org/apache/http/auth/NTCredentials.java index d4bea6f8c..ec74c0ba6 100644 --- a/httpclient/src/main/java/org/apache/http/auth/NTCredentials.java +++ b/httpclient/src/main/java/org/apache/http/auth/NTCredentials.java @@ -154,7 +154,6 @@ public class NTCredentials implements Credentials, Serializable { @Override public boolean equals(Object o) { - if (o == null) return false; if (this == o) return true; if (o instanceof NTCredentials) { NTCredentials that = (NTCredentials) o; diff --git a/httpclient/src/main/java/org/apache/http/auth/NTUserPrincipal.java b/httpclient/src/main/java/org/apache/http/auth/NTUserPrincipal.java index 379870605..2e32dfafa 100644 --- a/httpclient/src/main/java/org/apache/http/auth/NTUserPrincipal.java +++ b/httpclient/src/main/java/org/apache/http/auth/NTUserPrincipal.java @@ -94,7 +94,6 @@ public class NTUserPrincipal implements Principal, Serializable { @Override public boolean equals(Object o) { - if (o == null) return false; if (this == o) return true; if (o instanceof NTUserPrincipal) { NTUserPrincipal that = (NTUserPrincipal) o; diff --git a/httpclient/src/main/java/org/apache/http/auth/UsernamePasswordCredentials.java b/httpclient/src/main/java/org/apache/http/auth/UsernamePasswordCredentials.java index b9eb315cd..9bbd7df22 100644 --- a/httpclient/src/main/java/org/apache/http/auth/UsernamePasswordCredentials.java +++ b/httpclient/src/main/java/org/apache/http/auth/UsernamePasswordCredentials.java @@ -103,7 +103,6 @@ public class UsernamePasswordCredentials implements Credentials, Serializable { @Override public boolean equals(Object o) { - if (o == null) return false; if (this == o) return true; if (o instanceof UsernamePasswordCredentials) { UsernamePasswordCredentials that = (UsernamePasswordCredentials) o;