groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jochen Kemnade (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GROOVY-8252) AIOOBE in combination of ncurry and rcurry
Date Fri, 07 Jul 2017 12:29:00 GMT

    [ https://issues.apache.org/jira/browse/GROOVY-8252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16078006#comment-16078006
] 

Jochen Kemnade commented on GROOVY-8252:
----------------------------------------

I can reproduce this with 2.5.0-beta-1, and also with a simpler example:
{code}
def c = { a, b, c -> println a + b + c }
c.rcurry("b", "c")()
{code}
{noformat}
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
	at java.lang.System.arraycopy(Native Method)
	at org.codehaus.groovy.runtime.CurriedClosure.getUncurriedArguments(CurriedClosure.java:103)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1084)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
	at groovy.lang.Closure.call(Closure.java:414)
	at groovy.lang.Closure.call(Closure.java:408)
	at java_util_concurrent_Callable$call.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
	at Test.run(Test.groovy:3)
{noformat}

> AIOOBE in combination of ncurry and rcurry
> ------------------------------------------
>
>                 Key: GROOVY-8252
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8252
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.4.12
>            Reporter: Daniil Ovchinnikov
>
> {code}
> def c = { a, b, c, d -> println a + b + c + d }
> c.ncurry(0, "a").rcurry("c", "d")() // note no args passed
> {code}
> Expected: MissingMethodException or {{null}} passed.
> Actual:
> {noformat}
> java.lang.ArrayIndexOutOfBoundsException
> at java_util_concurrent_Callable$call.call(Unknown Source)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message