You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2021/12/18 15:37:00 UTC
[jira] [Updated] (GROOVY-4214) StackOverflowError tyring to mixin loaded script
[ https://issues.apache.org/jira/browse/GROOVY-4214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles updated GROOVY-4214:
--------------------------------
Labels: StackOverflowError mixin (was: mixin)
> StackOverflowError tyring to mixin loaded script
> ------------------------------------------------
>
> Key: GROOVY-4214
> URL: https://issues.apache.org/jira/browse/GROOVY-4214
> Project: Groovy
> Issue Type: Bug
> Components: groovy-runtime
> Reporter: Ittay Dror
> Priority: Major
> Labels: StackOverflowError, mixin
>
> In groovyConsole I have this:
> {code}
> import groovy.util.*
> import org.codehaus.groovy.runtime.*
> def gse = new GroovyScriptEngine("c:\\temp")
> def script = gse.loadScriptByName("say.groovy")
> this.metaClass.mixin script
> say("bye")
> {code}
> say.groovy contains
> {code}
> def say(String msg) {
> println(msg)
> }
> {code}
> I get:
> {noformat}
> java.lang.StackOverflowError
> at sun.reflect.GeneratedMethodAccessor548.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
> at org.codehaus.groovy.runtime.metaclass.MixinInstanceMetaMethod.invoke(MixinInstanceMetaMethod.java:38)
> at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:913)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:706)
> at org.codehaus.groovy.runtime.metaclass.OwnedMetaClass.invokeMethod(OwnedMetaClass.java:97)
> at groovy.lang.GroovyObjectSupport.invokeMethod(GroovyObjectSupport.java:44)
> at groovy.lang.Script.invokeMethod(Script.java:78)
> at sun.reflect.GeneratedMethodAccessor548.invoke(Unknown Source)
> ...
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)