[
https://issues.apache.org/jira/browse/GROOVY-11903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles resolved GROOVY-11903.
----------------------------------
Fix Version/s: 5.0.6
Resolution: Fixed
> Iterable minus modifies self in slow path
> -----------------------------------------
>
> Key: GROOVY-11903
> URL: https://issues.apache.org/jira/browse/GROOVY-11903
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 5.0.0
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Major
> Fix For: 5.0.6
>
>
> Consider the following:
> {code:groovy}
> def one = [null,1,2,3]
> def two = [3]
> println(one - two)
> println(one)
> println(two)
> {code}
> The lists could be filled with any type, as long as the first element is not
> Comparable. When printing one, the element "3" is no longer present.
> "one.asUnmodifiable() - two" throws UnsupportedOperationException
--
This message was sent by Atlassian Jira
(v8.20.10#820010)