hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCLIENT-1335) Remove final modifler from all AbstractHttpClient.execute methods
Date Thu, 04 Apr 2013 08:41:17 GMT

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13621930#comment-13621930
] 

Oleg Kalnichevski commented on HTTPCLIENT-1335:
-----------------------------------------------

I could do that. The problem is that AbstractHttpClient has been deprecated in 4.3 and sooner
or later you will have to change your test cases to use HttpClient interface anyway. Besides,
instead of setting user credentials globally with AbstractHttpClient#getCredentialsProvider
you might be better off using local CredentialsProvider bound to a local HttpContext.

https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientCustomContext.java

Oleg
                
> Remove final modifler from all AbstractHttpClient.execute methods
> -----------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1335
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1335
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>    Affects Versions: 4.2.3
>            Reporter: Richard Barnett
>            Priority: Minor
>
> Of 8 AbstractHttpClient.execute methods, 4 are declared final & 4 (those with a ResponseHandler
parameter) are not.
> Remove this modifier as it prevents JMock from mocking these methods.
> It also doesn't seem to make sense for half the methods to be final.
> (Mocking the HttpClient interface is not appropriate for my tests as I have to call AbstractHttpClient.getCredentialsProvider).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


Mime
View raw message