[
https://issues.apache.org/jira/browse/GROOVY-11903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles updated GROOVY-11903:
---------------------------------
Description:
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.asImmutable() - two" throws UnsupportedOperationException
was:
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.
> List minus modifies self in slow path (first element not comparable)
> --------------------------------------------------------------------
>
> 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
> Priority: Major
>
> 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.asImmutable() - two" throws UnsupportedOperationException
--
This message was sent by Atlassian Jira
(v8.20.10#820010)