[
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: [email protected]
For additional commands, e-mail: [email protected]