Discussion:
bug in sample code at https://hc.apache.org/httpcomponents-asyncclient-4.1.x/quickstart.html
Ron Reynolds
2017-09-22 19:07:42 UTC
Permalink
httpclient.execute(producer3, consumer3, new FutureCallback<HttpResponse>()
{
public void completed(final HttpResponse response3) {
latch2.countDown();
System.out.println(request2.getRequestLine() + "->" +
response3.getStatusLine());
}
public void failed(final Exception ex) {
latch2.countDown();
System.out.println(request2.getRequestLine() + "->" + ex);
}
public void cancelled() {
latch2.countDown();
System.out.println(request2.getRequestLine() + " cancelled");
}
});

i believe all the "request2"s should be "request3"s.

wasn't sure if there was a better list to send this errata to...
Oleg Kalnichevski
2017-09-25 13:24:24 UTC
Permalink
Post by Ron Reynolds
httpclient.execute(producer3, consumer3, new
FutureCallback<HttpResponse>()
{
        public void completed(final HttpResponse response3) {
            latch2.countDown();
            System.out.println(request2.getRequestLine() + "->" +
response3.getStatusLine());
        }
        public void failed(final Exception ex) {
            latch2.countDown();
            System.out.println(request2.getRequestLine() + "->" +
ex);
        }
        public void cancelled() {
            latch2.countDown();
            System.out.println(request2.getRequestLine() + "
cancelled");
        }
    });
i believe all the "request2"s should be "request3"s.
wasn't sure if there was a better list to send this errata to...
Corrected.

http://svn.apache.org/viewvc?rev=1809625&view=rev
http://git-wip-us.apache.org/repos/asf/httpcomponents-website/blob/2a33
500d/src/site/apt/httpcomponents-asyncclient-4.1.x/quickstart.apt

Many thanks for reporting it, Ron.

Oleg

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-***@hc.apache.org
For additional commands, e-mail: httpclient-users-***@hc.apache.org
Loading...