[
https://issues.apache.org/jira/browse/HTTPCLIENT-2059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Oleg Kalnichevski resolved HTTPCLIENT-2059.
-------------------------------------------
Fix Version/s: 5.0.1
Resolution: Fixed
> MinimalHttpAsyncClient does not allow null HttpContext
> ------------------------------------------------------
>
> Key: HTTPCLIENT-2059
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2059
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient (async)
> Affects Versions: 5.0
> Reporter: Siqi Li
> Priority: Minor
> Fix For: 5.0.1
>
>
> In HttpAsyncClient.execute, the Javadoc says:
> {code:java}
> @param context HTTP context. Optional and may be {@code null}.{code}
> However, the following code will cause a NullPointerException because the
> input HttpContext is null:
> {code:java}
> public static void main(String[] args) throws Exception {
> try (MinimalHttpAsyncClient client = HttpAsyncClients.createMinimal()) {
> client.start();
>
> client.execute(SimpleRequestProducer.create(SimpleHttpRequests.get("https://example.com")),
> SimpleResponseConsumer.create(), null, null, null).get();
> }
> }{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]