[ https://issues.apache.org/jira/browse/GROOVY-11378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles resolved GROOVY-11378. ---------------------------------- Fix Version/s: 5.0.0-alpha-9 Resolution: Fixed https://github.com/apache/groovy/commit/d54ca19ac474c5b2d9861c4287051cde58daaded > 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: 5.0.0-alpha-9 > > > 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)