Niklas Schandry
06/26/2026, 8:44 AMmap and collect seems to be slightly different? For example, with a 2 item channel .map {_item1, item2 -> item2} or .map { items -> items[1]} and both are ok, but with .collect only .collect { items -> items[1] } appears to work, but .collect { _item1, item2 -> item2 } throws an error?pontus
06/26/2026, 10:58 AM{ it[1] } will happily run no matter how long the it is (access to a nonexisting index yields null), whereas { _item1, item2 -> item2 } will blow up if it doesn't have exactly two elements.Niklas Schandry
06/26/2026, 11:01 AMpontus
06/26/2026, 11:01 AMNiklas Schandry
06/26/2026, 11:02 AMit that is not part of it will return nullpontus
06/26/2026, 11:05 AMcollect will need to run through all at once whereas one could allow for having the mapping of an element only done when it's to be consumed with map).Niklas Schandry
06/26/2026, 11:07 AMgroovy.lang.MissingMethodException: No signature of method: Script_16f8fb075687b1c5$_runScript_closure1$_closure2$_closure12.doCall() is applicable for argument types: (ArrayList) values: [[]]
Possible solutions: doCall(java.lang.Object, java.lang.Object), findAll(), findAll(), isCase(java.lang.Object), isCase(java.lang.Object)
in case that is informative for youpontus
06/26/2026, 11:11 AMpontus
06/26/2026, 11:11 AMmap and collect.Niklas Schandry
06/26/2026, 11:12 AM