[
https://issues.apache.org/jira/browse/IGNITE-12678?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Konstantin Orlov updated IGNITE-12678:
--------------------------------------
Description: Currently it is possible to create GridLongList backed by
empty array. But when you try to add a new element to such list, exception
ArrayIndexOutOfBound will be thrown. It caused by lack of handling of corner
cases in add* methods: if there is no space to insert new element, old length
just doubled, but 0 * 2 is always 0.
> GridLongList fails on add when created with explicit zero size
> --------------------------------------------------------------
>
> Key: IGNITE-12678
> URL: https://issues.apache.org/jira/browse/IGNITE-12678
> Project: Ignite
> Issue Type: Bug
> Components: data structures
> Reporter: Konstantin Orlov
> Priority: Minor
>
> Currently it is possible to create GridLongList backed by empty array. But
> when you try to add a new element to such list, exception
> ArrayIndexOutOfBound will be thrown. It caused by lack of handling of corner
> cases in add* methods: if there is no space to insert new element, old length
> just doubled, but 0 * 2 is always 0.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)