You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2023/08/01 20:57:00 UTC
[jira] [Updated] (GROOVY-11070) ObjectArrayStaticTypesHelper does not handle negative indices
[ https://issues.apache.org/jira/browse/GROOVY-11070?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles updated GROOVY-11070:
---------------------------------
Priority: Major (was: Minor)
> ObjectArrayStaticTypesHelper does not handle negative indices
> -------------------------------------------------------------
>
> Key: GROOVY-11070
> URL: https://issues.apache.org/jira/browse/GROOVY-11070
> Project: Groovy
> Issue Type: Improvement
> Components: Static compilation
> Affects Versions: 4.0.12
> Reporter: Christopher Smith
> Assignee: Eric Milles
> Priority: Major
> Fix For: 5.0.0-alpha-1
>
>
> In general, the index-based DGM {{getAt}} has the convenient feature of wrapping negative indices to "from-the-end"-based indices. However, the STC's implementation of {{getAt}} for arrays (in {{ObjectArrayStaticTypesHelper}} and the companion classes) does not do this an instead throws AIOOBE on a negative index. It should have consistent behavior with other indexing types.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)