[prev in list] [next in list] [prev in thread] [next in thread] 

List:       groovy-dev
Subject:    [groovy-dev] Re: [groovy-scm] [jira] Commented: (GROOVY-4922) StackOverflowError
From:       "Hamlet D'Arcy" <hamletdrc () gmail ! com>
Date:       2011-07-21 15:17:54
Message-ID: CA+L6sO8BD0Xji+DucaDRy1b3U6-z5+OaqM1Ej6Qh=+PEmqUhNA () mail ! gmail ! com
[Download RAW message or body]

Jochen,

The last example I uploaded throws a stack overflow when compiled with
1.7.11-SNAPSHOT and run with 1.8.1-SNAPSHOT.

--
Hamlet


On Thu, Jul 21, 2011 at 5:06 PM, Jochen Theodorou (JIRA)
<jira@codehaus.org> wrote:
> 
> [ https://jira.codehaus.org/browse/GROOVY-4922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=273855#comment-273855 \
> ] 
> Jochen Theodorou commented on GROOVY-4922:
> ------------------------------------------
> 
> compiled with 1.7.8 and run with 1.8.1 does not work, but run with 1.7.8 does also \
> not 
> > StackOverflowError when calling super and overriding a package protected java \
> >                 method
> > ------------------------------------------------------------------------------------
> >  
> > Key: GROOVY-4922
> > URL: https://jira.codehaus.org/browse/GROOVY-4922
> > Project: groovy
> > Issue Type: Bug
> > Affects Versions: 1.8.0
> > Reporter: Cedric Champeau
> > Assignee: Cedric Champeau
> > Fix For: 1.7.11, 1.8.2, 1.9-beta-2
> > 
> > Attachments: 4922failure.patch, GROOVY-4922-new.patch, GROOVY-4922.patch, \
> > stackoverflow-example.zip, test-reports.tar.gz 
> > 
> > For reference : http://groovy.329449.n5.nabble.com/StackOverflowError-when-dispatching-to-super-td4572268.html
> >  If a package protected method written in a Java class is overriden in a Groovy \
> > class and that method calls super.method(), Groovy throws a stack overflow : \
> > {code:title=Parent.java} class Parent {
> > void someMethod(String param) { ... }
> > }
> > {code}
> > {code:title=Child.groovy}
> > class Child {
> > void someMethod(String param) { super.someMethod(param) }
> > }
> > {code}
> > {code}
> > java.lang.StackOverflowError
> > at java.lang.Exception.<init>(Exception.java:77)
> > at java.lang.reflect.InvocationTargetException.<init>(InvocationTargetException.java:54)
> >  at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >  at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
> > at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
> > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1054)
> > at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:128)
> >  at groovy.bugs.GroovyStackOverflowBug$Child.someMethod(GroovyStackOverflowBug.groovy:39)
> >  at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >  at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
> > at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
> > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1054)
> > at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:128)
> >  at groovy.bugs.GroovyStackOverflowBug$Child.someMethod(GroovyStackOverflowBug.groovy:39)
> >  at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >  at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
> > at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
> > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1054)
> > at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:128)
> >  at groovy.bugs.GroovyStackOverflowBug$Child.someMethod(GroovyStackOverflowBug.groovy:39)
> >  at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
> > ...
> > {code}
> > Adding a public or protected modifier to the super class solves the problem.
> 
> --
> This message is automatically generated by JIRA.
> For more information on JIRA, see: http://www.atlassian.com/software/jira
> 
> 
> 
> <hr/>
> <p>
> To unsubscribe from this list please visit:
> </p>
> <p>
> <a href="http://xircles.codehaus.org/manage_email">http://xircles.codehaus.org/manage_email</a>
>  
> 



-- 
Hamlet D'Arcy
hamletdrc@gmail.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic