Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-11070

ObjectArrayStaticTypesHelper does not handle negative indices

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0.12
    • 5.0.0-alpha-1
    • Static compilation
    • None

    Description

      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.

      Attachments

        Activity

          People

            emilles Eric Milles
            chrylis Christopher Smith
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: