On Tue, 2022-11-29 at 21:54 +0100, Michael Osipov wrote:
> Am 2022-11-29 um 21:03 schrieb Oleg Kalnichevski:
> > Folks
> > 
> > Please review and amend the HttpClient 4.5.14 release notes as you
> > deem
> > appropriate.
> > 
> > https://github.com/apache/httpcomponents-client/blob/4.5.x/RELEASE_NOTES.txt
> 
> I have a question regarding this:
> 
> > * HTTPCLIENT-2174: URUBuilder to return a new empty list instead of
> > unmodifiable
> >   Collections#emptyList.
> 
> Beside the typo (URIBuilder), is the method's return value intended
> to 
> be immutable? From the JIRA issue I understand that the caller wants
> to 
> modify the list. It is not clear whether he wants to modify the copy
> or 
> the original one: builder#getPathSegments().add("foo").
> 

The intent of this change is to make sure that lists of elements
returned by URIBuilder are modifiable (mutable) in all cases. Prior to
this change empty lists returned by the builder were un-modifiable
(immutable). The builder always returns a copy of the internal
collection (pre and post HTTPCLIENT-2174) and not the internal
collection itself.

Oleg


> The rest looks fine to me.
> 
> Michael
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
> For additional commands, e-mail: dev-h...@hc.apache.org
> 


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

Reply via email to