You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2016/06/29 11:16:37 UTC
[jira] [Issue Comment Deleted] (GROOVY-7722) StackOverflowError
when use anonymous class with generics.
[ https://issues.apache.org/jira/browse/GROOVY-7722?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King updated GROOVY-7722:
------------------------------
Comment: was deleted
(was: See another example in the duplicate issue GROOVY-7864)
> StackOverflowError when use anonymous class with generics.
> ----------------------------------------------------------
>
> Key: GROOVY-7722
> URL: https://issues.apache.org/jira/browse/GROOVY-7722
> Project: Groovy
> Issue Type: Bug
> Components: ast builder
> Affects Versions: 2.4.4
> Environment: Groovy Version: 2.4.4 JVM: 1.8.0_51 Vendor: Oracle Corporation OS: Mac OS X
> Reporter: taka men
> Original Estimate: 12h
> Remaining Estimate: 12h
>
> I put a sample code to GitHub.
> https://github.com/takahirom/groovy-stackoverflow-bug
> I can reproduce it following code. And This error hasn't occurred in java8.
> {code}
> import java.util.*;
> interface Action1<T> {
> void call(T t);
> }
> abstract class Subscriber<T> {
> }
> interface OnSubscribe<T> extends Action1<Subscriber<? super T>> {
> }
> new OnSubscribe<List>() {
> @Override
> public void call(Subscriber<? super List> o){
> System.out.println("called");
> }
> }.call(null);
> {code}
> StackTrace:
> {noformat}
> $groovy -d Test.groovy
> Caught: java.lang.StackOverflowError
> java.lang.StackOverflowError
> at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:318)
> at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:342)
> at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:342)
> at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:342)
> at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:342)
> at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:342)
> at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:342)
> at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:342)
> at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:342)
> at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:342)
> at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:342)
> at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:342)
> at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:342)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)