hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Leigh (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HTTPCLIENT-1387) Replace URICollection with List<URI>
Date Thu, 15 Aug 2013 13:51:48 GMT

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

James Leigh edited comment on HTTPCLIENT-1387 at 8/15/13 1:51 PM:
------------------------------------------------------------------

This patch uses type-erasure to allow the RedirectLocations objects to implement both the
4.2 binary RedirectLocations interface AND implement java.util.List. This allows the object
to be cast to either a RedirectLocations object (using the 4.2 interface) XOR cast to List<URI>
interface. By using type-erasure the two interfaces use different method signatures to allow
the two to co-exist while having the same method names, number of parameters, and different
return types.

This patch is binary compatible with 4.2, yet provides a convenient List<URI> interface
for 4.3.

James
                
      was (Author: jamesrdf):
    This patch uses type-eraser to allow the RedirectLocations objects to implement both the
4.2 binary RedirectLocations interface AND implement java.util.List. This allows the object
to be cast to either a RedirectLocations object (using the 4.2 interface) XOR cast to List<URI>
interface. By using type-eraser the two interfaces use different method signatures to allow
the two to co-exist while having the same method names, number of parameters, and different
return types.

This patch is binary compatible with 4.2, yet provides a convenient List<URI> interface
for 4.3.

James
                  
> Replace URICollection with List<URI>
> ------------------------------------
>
>                 Key: HTTPCLIENT-1387
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1387
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>    Affects Versions: 4.3 Beta2
>            Reporter: James Leigh
>              Labels: patch
>             Fix For: 4.3 Final
>
>         Attachments: HTTPCLIENT-1387.patch
>
>
> The 4.3 API should use List<URI> interface (as opposed to URICollection) for redirect
locations, while also providing 4.2 RedirectLocations binary compatibility.

--
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