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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to