You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/12/05 09:38:00 UTC
[jira] [Commented] (HTTPCLIENT-1888) NullPointerException in
SystemDefaultCredentialsProvider.getCredentials when AuthScope.orgin is
null
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16278289#comment-16278289 ]
ASF subversion and git services commented on HTTPCLIENT-1888:
-------------------------------------------------------------
Commit 5bed670873a2e197bc047737d2f0f4518ab94524 in httpcomponents-client's branch refs/heads/4.5.x from [~olegk]
[ https://git-wip-us.apache.org/repos/asf?p=httpcomponents-client.git;h=5bed670 ]
HTTPCLIENT-1888: Regression in SystemDefaultCredentialsProvider#getCredentials causing NPE
> NullPointerException in SystemDefaultCredentialsProvider.getCredentials when AuthScope.orgin is null
> ----------------------------------------------------------------------------------------------------
>
> Key: HTTPCLIENT-1888
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1888
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Affects Versions: 4.5.4
> Reporter: Collin Peters
> Priority: Critical
>
> 4.5.4 has the following line in [SystemDefaultCredentialsProvider|https://github.com/apache/httpcomponents-client/blob/4.5.4/httpclient/src/main/java/org/apache/http/impl/client/SystemDefaultCredentialsProvider.java#L114]
> {code}
> final String protocol = origin != null ? origin.getSchemeName() : (origin.getPort() == 443 ? "https" : "http");
> {code}
> So 'origin' is still accessed when it is determined that it is null.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org