You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "John Enters (Jira)" <ji...@apache.org> on 2020/06/13 21:18:00 UTC

[jira] [Created] (HTTPCLIENT-2085) NPE in HttpClientBuilder addExecInterceptorFirst and addExecInterceptorLast

John Enters created HTTPCLIENT-2085:
---------------------------------------

             Summary: NPE in HttpClientBuilder addExecInterceptorFirst and addExecInterceptorLast
                 Key: HTTPCLIENT-2085
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2085
             Project: HttpComponents HttpClient
          Issue Type: Bug
          Components: HttpClient (classic)
    Affects Versions: 5.0
            Reporter: John Enters
             Fix For: 5.0.2


NPE thrown with the following:
{code:java}
HttpClients.custom().addExecInterceptorFirst("name", (ExecChainHandler) (request, scope, chain) -> null).build();

HttpClients.custom().addExecInterceptorLast("name", (ExecChainHandler) (request, scope, chain) -> null).build();
{code}
In org.apache.hc.client5.http.impl.classic.HttpClientBuilder

add the following to addExecInterceptorFirst (line 455) and addExecInterceptorLast (line 465)
{code:java}
if (execInterceptors == null) {
    execInterceptors = new LinkedList<>();
}
{code}
 

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org