[
https://issues.apache.org/jira/browse/MNG-8484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17910165#comment-17910165
]
Guillaume Nodet commented on MNG-8484:
--------------------------------------
The purpose was to make a defensive copy of the input collection. Calling
{{unmodifiableCollection}} just creates an unmodifiable wrapper, so the
underlying collection can be changed and those changes reflected. The objects
in the API are supposed to be immutable, and having a wrapper collection breaks
this guarantee.
> Perhaps remove BaseRequest.unmodifiable
> ---------------------------------------
>
> Key: MNG-8484
> URL: https://issues.apache.org/jira/browse/MNG-8484
> Project: Maven
> Issue Type: Bug
> Components: API
> Affects Versions: 4.0.0-rc-2
> Reporter: Elliotte Rusty Harold
> Priority: Blocker
> Fix For: 4.0.0-rc-3
>
>
> Consider that it has the unexpected effect of making all empty lists
> identical and equal, regardless of type, which might not be what we want. We
> could simply use Collections.unmodifiableCollection instead.
> This method also converts all collections to lists. That might be
> intentional, but if so it should be documented in a comment.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)