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

ASF subversion and git services commented on HTTPCLIENT-1889:
-------------------------------------------------------------

Commit 1780ab2bf37ad47fcb819e0a23491f522cb1e67b in httpcomponents-client's 
branch refs/heads/4.5.x from [~garydgregory]
[ https://git-wip-us.apache.org/repos/asf?p=httpcomponents-client.git;h=1780ab2 
]

[HTTPCLIENT-1889] org.apache.http.client.utils.URLEncodedUtils.parse()
should return a new ArrayList when there are no query parameters.


> org.apache.http.client.utils.URLEncodedUtils.parse() should return a new 
> ArrayList when there are no query parameters
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1889
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1889
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient (classic)
>    Affects Versions: 4.5.4, 5.0 Alpha3
>            Reporter: Gary Gregory
>            Assignee: Gary Gregory
>
> {{org.apache.http.client.utils.URLEncodedUtils.parse(URI, Charset)}} should 
> return a new {{ArrayList}} when there are no query parameters.
> Currently, {{org.apache.http.client.utils.URLEncodedUtils.parse(URI, 
> Charset)}} returns an immutable list through {{Collections.emptyList()}} if 
> there are no params> But if there are parameters, the method returns a 
> mutable list.
> This makes it impossible to write the same code to handle both cases.
> This change will cause the method to return a new {{ArrayList}} if there are 
> no parameters.
> The methods that are directly affected are:
> - {{org.apache.http.client.utils.URLEncodedUtils.parse(URI, Charset)}}
> - {{org.apache.http.client.utils.URLEncodedUtils.parse(HttpEntity)}}
> - {{org.apache.http.client.utils.URLEncodedUtils.parse(String, Charset)}}
> - {{org.apache.http.client.utils.URLEncodedUtils.parse(String, Charset, 
> char...)}}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to