groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GROOVY-7624) Collection asImmutable() methods aren't immutable
Date Tue, 06 Mar 2018 23:06:00 GMT

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

ASF GitHub Bot commented on GROOVY-7624:
----------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/groovy/pull/672


> Collection asImmutable() methods aren't immutable
> -------------------------------------------------
>
>                 Key: GROOVY-7624
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7624
>             Project: Groovy
>          Issue Type: Bug
>          Components: groovy-jdk
>    Affects Versions: 2.4.5
>            Reporter: Christopher Smith
>            Assignee: Paul King
>            Priority: Minor
>              Labels: breaking
>
> The contract for the Collection {{asImmutable()}} methods specify that the returned collection
is immutable, but in fact the collection is merely read-only; it uses {{Collections.unmodifiable*()}},
which wraps an underlying collection that is still mutable.
> These methods should return actual immutable collections, either using Collections unmodifiables
with copies of the underlying collections or using an actual immutable backing implementation,
a la Guava.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message