diff --git a/httpclient/src/main/java/org/apache/http/conn/routing/RouteTracker.java b/httpclient/src/main/java/org/apache/http/conn/routing/RouteTracker.java index 86ada48ba..dcf227d77 100644 --- a/httpclient/src/main/java/org/apache/http/conn/routing/RouteTracker.java +++ b/httpclient/src/main/java/org/apache/http/conn/routing/RouteTracker.java @@ -294,7 +294,7 @@ public final class RouteTracker implements RouteInfo, Cloneable { return false; RouteTracker that = (RouteTracker) o; - return + return // Do the cheapest checks first (this.connected == that.connected) && (this.secure == that.secure) && @@ -315,26 +315,19 @@ public final class RouteTracker implements RouteInfo, Cloneable { */ @Override public final int hashCode() { - - int hc = this.targetHost.hashCode(); - - if (this.localAddress != null) - hc ^= localAddress.hashCode(); + int hash = LangUtils.HASH_SEED; + hash = LangUtils.hashCode(hash, this.targetHost); + hash = LangUtils.hashCode(hash, this.localAddress); if (this.proxyChain != null) { - hc ^= proxyChain.length; - for (int i=0; i HttpRouteDirector.COMPLETE); @@ -945,8 +941,7 @@ public class DefaultRequestDirector implements RequestDirector { // complexity. Feel free to submit patches that refactor the code in // createTunnelToTarget to facilitate re-use for proxy tunnelling. - throw new UnsupportedOperationException - ("Proxy chains are not supported."); + throw new HttpException("Proxy chains are not supported."); }