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
This commit is contained in:
Sebastian Bazley 2013-01-18 19:40:42 +00:00
parent 5bdd456c8c
commit 0730d6c7c9
1 changed files with 1 additions and 1 deletions

View File

@ -92,7 +92,7 @@ public class RequestAuthCache implements HttpRequestInterceptor {
} }
final AuthState targetState = clientContext.getTargetAuthState(); 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); final AuthScheme authScheme = authCache.get(target);
if (authScheme != null) { if (authScheme != null) {
doPreemptiveAuth(target, authScheme, targetState, credsProvider); doPreemptiveAuth(target, authScheme, targetState, credsProvider);