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 08:34:16 UTC

[jira] [Closed] (GROOVY-7864) Stack overflow correcting generics when using @CompileStatic

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

Paul King closed GROOVY-7864.
-----------------------------
    Resolution: Duplicate

Closing this in favor of the duplicate.

> Stack overflow correcting generics when using @CompileStatic
> ------------------------------------------------------------
>
>                 Key: GROOVY-7864
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7864
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.4.7
>            Reporter: Graeme Rocher
>              Labels: duplicate
>
> I have this RxJava code:
> {code}
> HttpClientRequest httpClientRequest = httpClient.createGet(uri)
> httpClientRequest
>         .switchMap { HttpClientResponse response ->
>     response.getContent()
> }.switchMap { Object object ->
>     return Observable.create(new Observable.OnSubscribe() {
>         @Override
>         void call(Subscriber subscriber) {
>             ....
>         }
>     })
> }
> {code}
> Which produces a StackOverflow:
> {code}
> Information:Groovyc: java.lang.StackOverflowError
>     at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:316)
>     at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:340)
>     at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:340)
>     at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:340)
>     at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:340)
>     at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:340)
>     at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:340)
>     at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:340)
>     at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:340)
>     at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:340)
>     at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:340)
> ls.correctToGenericsSpecRecurse(GenericsUtils.java:340)
>     at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:340)
>     at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:340)
>     at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:340)
>     at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:340)
>     at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:340)
>     at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:340)
>     at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:340)
>     at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:340)
>     at org.codehaus.groovy.ast.tools.GenericsUtils.correctToGenericsSpecRecurse(GenericsUtils.java:340)
>   etc.
> {code}
> Issues seems to originate from the `new  Observable.OnSubscribe()` anonymous inner class constructor



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)