[
https://issues.apache.org/jira/browse/HTTPCLIENT-2059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Siqi Li updated HTTPCLIENT-2059:
--------------------------------
Issue Type: Bug (was: Improvement)
> 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
>
> In `HttpAsyncClient.execute`, the Javadoc says `@param context HTTP context.
> Optional and may be \{@code null}.`
> 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);
> }
> }{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]