In very old versions of Groovy, I believe there was a mechanism that
tried to be smart for some GPath expressions, working out when the
list size was 1 and in that case returning the value instead of the
list. This turned out to be a bad idea that was trying to be "too
smart", prohibiting certain k
On 5/14/25 11:55, Jeemol K S via dev wrote:
[...]
In *Groovy 2.x*, it was possible to reference elements directly without
specifying the index, such as:
|response.itemResult.itemResultItems.salePrice |
However, in *Groovy 3.x*, the same reference now requires explicit indexing:
|response.
ge documentation:
https://docs.groovy-lang.org/latest/html/documentation/#_syntax_enhancements_for_collections
From: Jeemol K S via dev
Sent: Wednesday, May 14, 2025 4:55 AM
To: dev@groovy.apache.org
Cc: Jeemol K S
Subject: [EXT] Clarification on Explicit Indexing Requirement in Groo
Team,
I am reaching out to seek clarification regarding a behavior change introduced
in Groovy 3.x, particularly concerning the requirement for explicit indexing
when accessing elements in arrays or lists, especially in scenarios involving
maps.
In Groovy 2.x, it was possible to reference elemen