Re: Clarification on Explicit Indexing Requirement in Groovy 3.x

2025-06-05 Thread Paul King
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

Re: Clarification on Explicit Indexing Requirement in Groovy 3.x

2025-06-02 Thread Jochen Theodorou
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.

Re: Clarification on Explicit Indexing Requirement in Groovy 3.x

2025-05-16 Thread Milles, Eric (TR Technology) via dev
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

Clarification on Explicit Indexing Requirement in Groovy 3.x

2025-05-14 Thread Jeemol K S via dev
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