Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
5.0
-
None
Description
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:
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(); } }