jira-importer opened a new issue, #1026:
URL: https://github.com/apache/httpcomponents-core/issues/1026

   **[Gary D. 
Gregory](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=garydgregory)**
 opened 
**[HTTPCORE-501](https://issues.apache.org/jira/browse/HTTPCORE-501?redirect=false)**
 and commented
   
   `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)
   
   
   
   ---
   
   **Affects:** 5.0-beta1
   
   **Issue Links:**
   - [HTTPCLIENT-1889](https://issues.apache.org/jira/browse/HTTPCLIENT-1889) 
org.apache.http.client.utils.URLEncodedUtils.parse() should return a new 
ArrayList when there are no query parameters
    (_**"is a clone of"**_)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to