You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Rob Griffin (JIRA)" <ji...@apache.org> on 2017/04/12 03:02:41 UTC

[jira] [Created] (HTTPCLIENT-1839) BasicFuture get() implementation doesn't handle cancellation

Rob Griffin created HTTPCLIENT-1839:
---------------------------------------

             Summary: BasicFuture get() implementation doesn't handle cancellation
                 Key: HTTPCLIENT-1839
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1839
             Project: HttpComponents HttpClient
          Issue Type: Bug
    Affects Versions: 4.5.3
            Reporter: Rob Griffin


The Javadoc for Future.get() states:

	V get() throws InterruptedException, ExecutionException, TimeoutException

	Waits if necessary for the computation to complete, and then retrieves its result.

	Returns: 
		the computed result 
	Throws: 
		CancellationException - if the computation was cancelled 
		ExecutionException - if the computation threw an exception 
		InterruptedException - if the current thread was interrupted while waiting 

But when I look at the implementation of the get method in org.apache.http.concurrent.BasicFuture it doesn't throw a CancellationException which seems wrong to me. Sure I can call isCancelled() after get() returns but I shouldn't need to. 




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org