You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/09/11 11:51:00 UTC

[jira] [Commented] (HTTPCLIENT-2174) URIBuilder.getPathSegments() always returns ArrayList

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

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

Commit a0b85d44c26430ff8354a0af5a1b7d58e2e5bce5 in httpcomponents-client's branch refs/heads/4.5.x from Oleg Kalnichevski
[ https://gitbox.apache.org/repos/asf?p=httpcomponents-client.git;h=a0b85d4 ]

HTTPCLIENT-2174: URUBuilder to return a new empty list instead of unmodifiable Collections#emptyList


> URIBuilder.getPathSegments() always returns ArrayList
> -----------------------------------------------------
>
>                 Key: HTTPCLIENT-2174
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2174
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>    Affects Versions: 4.5.13
>            Reporter: Nathan Reynolds
>            Priority: Trivial
>
> URIBuilder.getPathSegments() returns Collections.emptyList() if pathSegments == null.  Please change this to always return an ArrayList so the caller can call add().  Without this change, the caller has to either make another copy of ArrayList every time or the caller has to detect that the List is empty and create an ArrayList.  This is very clunky to use.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org