You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2017/05/02 02:04:19 UTC
[jira] [Closed] (GROOVY-5426) ObjectRange.iterator() is reliant on
size()
[ https://issues.apache.org/jira/browse/GROOVY-5426?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-5426.
-----------------------------
> ObjectRange.iterator() is reliant on size()
> -------------------------------------------
>
> Key: GROOVY-5426
> URL: https://issues.apache.org/jira/browse/GROOVY-5426
> Project: Groovy
> Issue Type: Improvement
> Components: groovy-jdk
> Affects Versions: 1.8.6
> Reporter: Tim Yates
> Assignee: Paul King
> Fix For: 2.5.0-alpha-1
>
>
> Currently the ObjectRange iterator is reliant on the size of the range.
> If the range is made up of BigInteger or BigDecimal, would it be possible to safely change this to call increment or decrement on a current internal value until it reaches its destination?
> The problem is exhibited by:
> {code}
> assert [] == (1.0G..2147483648.0G).iterator().take( 2 ).collect()
> {code}
> Where I would expect {{[1, 2]}}
> The problem is that size (being an int) for this range is -2147483648
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)