You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "ZENG Jipeng (JIRA)" <ji...@apache.org> on 2016/01/05 04:55:39 UTC

[jira] [Updated] (GROOVY-7725) compatibility issue of class groovy.lang.IntRange

     [ https://issues.apache.org/jira/browse/GROOVY-7725?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ZENG Jipeng updated GROOVY-7725:
--------------------------------
    Summary: compatibility issue of class groovy.lang.IntRange  (was: compatibility issue of function IntRange())

> compatibility issue of class groovy.lang.IntRange
> -------------------------------------------------
>
>                 Key: GROOVY-7725
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7725
>             Project: Groovy
>          Issue Type: Bug
>          Components: groovy-runtime, GroovyScriptEngine
>    Affects Versions: 2.4.5
>            Reporter: ZENG Jipeng
>            Priority: Critical
>
> Hi,
> We are using the class groovy.lang.IntRange in our code to get the sub string, everything is working fine. Recently, we upgrade the groovy version from 1.7.8 to 2.4.5, but the the code is no more working with an error message "java.lang.IllegalStateException: Should not call subListBorders on a non-inclusive aware IntRange". Here are the sample codes,
> {quote}
> def name = "this is a test";
> IntRange range = new IntRange(5,6);
> return name.getAt(range);
> {quote}
> In the version 1.7.8, it can successfully return "is".
> I read the groovy api document and found the constructor of IntRange seems have some changes, so I change the code,
> {quote}
> def name = "this is a test";
> IntRange range = new IntRange(*true*,5,6);
> return name.getAt(range);
> {quote}
> And it can work well again in the version 2.4.5.
> So, this looks like a compatibility issue to me, is this a known issue? Is there anyway to solve this without modify the source code? Thanks.
> BR,
> Jipeng



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)