[
https://issues.apache.org/jira/browse/GROOVY-11378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles updated GROOVY-11378:
---------------------------------
Fix Version/s: 3.0.22
> array or collection coercion of non-collection iterable produces
> single-element result
> --------------------------------------------------------------------------------------
>
> Key: GROOVY-11378
> URL: https://issues.apache.org/jira/browse/GROOVY-11378
> Project: Groovy
> Issue Type: Bug
> Components: groovy-jdk
> Affects Versions: 3.0.0, 4.0.0, 5.0.0-alpha-8
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Major
> Fix For: 3.0.22, 5.0.0-alpha-9, 4.0.22
>
>
> Consider the following:
> {code:groovy}
> @Grab('org.apache.commons:commons-collections4:4.4')
> import org.apache.commons.collections4.FluentIterable
> def iterable = FluentIterable.of(['foo','bar','baz'])
> def array = iterable as String[]
> print array.length
> {code}
> This script prints "1". We are expecting an array of 3 strings.
> GROOVY-7867, GROOVY-10028, GROOVY-10223
--
This message was sent by Atlassian Jira
(v8.20.10#820010)