[
https://issues.apache.org/jira/browse/GROOVY-11903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18072596#comment-18072596
]
ASF GitHub Bot commented on GROOVY-11903:
-----------------------------------------
eric-milles commented on PR #2434:
URL: https://github.com/apache/groovy/pull/2434#issuecomment-4224016493
So is this okay to merge? You can always revisit to improve performance as
long as you retain not modifying the inputs.
> 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
>
> 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)