groovy/groovy-core — pull request #37 by andresteingress (2012-03-13 20:15:11+00:00)
Title: GROOVY-4946 Groovy getAt cannot be used with lazily initialized lists

Hi,

This commit fixes GROOVY-4946 by adding a List.withDefault to DGM. As done by Commons LazyList a list created with

[].withDefault { 42 }

automatically grows when get(index) or getAt(index) is called. Gaps will be filled wither either null or the default value (in the case above, 42).

Cheers, André