From 0730d6c7c97c8d3936ccb51af663757157002163 Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Fri, 18 Jan 2013 19:40:42 +0000 Subject: [PATCH] target cannot be null here otherwise the earlier invocation of target.getPort() would fail with NPE git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1435320 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/http/client/protocol/RequestAuthCache.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpclient/src/main/java/org/apache/http/client/protocol/RequestAuthCache.java b/httpclient/src/main/java/org/apache/http/client/protocol/RequestAuthCache.java index 6bc68d991..214d87f24 100644 --- a/httpclient/src/main/java/org/apache/http/client/protocol/RequestAuthCache.java +++ b/httpclient/src/main/java/org/apache/http/client/protocol/RequestAuthCache.java @@ -92,7 +92,7 @@ public void process(final HttpRequest request, final HttpContext context) } final AuthState targetState = clientContext.getTargetAuthState(); - if (target != null && targetState != null && targetState.getState() == AuthProtocolState.UNCHALLENGED) { + if (targetState != null && targetState.getState() == AuthProtocolState.UNCHALLENGED) { final AuthScheme authScheme = authCache.get(target); if (authScheme != null) { doPreemptiveAuth(target, authScheme, targetState, credsProvider);