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

Paul King updated GROOVY-7725:
------------------------------
    Priority: Major  (was: Critical)

> 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
>
> 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)

Reply via email to