[ https://issues.apache.org/jira/browse/HTTPCORE-501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16293258#comment-16293258 ]
ASF subversion and git services commented on HTTPCORE-501: ---------------------------------------------------------- Commit 496f5bf390c10626486665ee1c8f859d3dc4888d in httpcomponents-core's branch refs/heads/master from [~garydgregory] [ https://git-wip-us.apache.org/repos/asf?p=httpcomponents-core.git;h=496f5bf ] HTTPCORE-501 org.apache.http.client.utils.URLEncodedUtils.parse() should return a new ArrayList when there are no query parameters. > org.apache.hc.core5.net.URLEncodedUtils.parse() should return a new ArrayList > when there are no query parameters > ---------------------------------------------------------------------------------------------------------------- > > Key: HTTPCORE-501 > URL: https://issues.apache.org/jira/browse/HTTPCORE-501 > Project: HttpComponents HttpCore > Issue Type: Improvement > Components: HttpCore > Affects Versions: 5.0-beta1 > 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.hc.core5.net.URLEncodedUtils.parse(String, Charset, char...) > - org.apache.hc.core5.net.URLEncodedUtils.parse(String, Charset) > - org.apache.hc.core5.net.URLEncodedUtils.parse(URI, Charset) -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org