You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniel Sun (JIRA)" <ji...@apache.org> on 2018/04/05 14:12:00 UTC
[jira] [Updated] (GROOVY-8531) Fail to resolve type defined in
super class written in Java
[ https://issues.apache.org/jira/browse/GROOVY-8531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Sun updated GROOVY-8531:
-------------------------------
Description:
I am trying to write a hadoop example in Groovy and find groovy can not resolve type defined in super class written in Java:
*Groovy version(qualified class name required. Note: Reducer is written in Java)*
[https://github.com/danielsun1106/hadoop-wordcount/blob/master/src/main/groovy/me/sunlan/hadooplabs/wordcount/GroovyWordCount.groovy#L36]
*Java version(Only class name)*
[https://github.com/danielsun1106/hadoop-wordcount/blob/master/src/main/java/me/sunlan/hadooplabs/wordcount/WordCount.java#L39]
In the meanwhile, I find the issue does *not* exist if super class is written in Groovy too:
{code:java}
class Reducer {
public abstract class Context {}
}
class Example extends Reducer {
public void reduce(Context context) {}
}
new Example().reduce(null)
{code}
was:
I am trying to write a hadoop example in Groovy and find groovy can not resolve type defined in super class written in Java:
*Groovy version(qualified class name required)*
[https://github.com/danielsun1106/hadoop-wordcount/blob/master/src/main/groovy/me/sunlan/hadooplabs/wordcount/GroovyWordCount.groovy#L36]
*Java version(Only class name)*
[https://github.com/danielsun1106/hadoop-wordcount/blob/master/src/main/java/me/sunlan/hadooplabs/wordcount/WordCount.java#L39]
In the meanwhile, I find the issue does *not* exist if super class is written in Groovy too:
{code:java}
class Reducer {
public abstract class Context {}
}
class Example extends Reducer {
public void reduce(Context context) {}
}
new Example().reduce(null)
{code}
> Fail to resolve type defined in super class written in Java
> -----------------------------------------------------------
>
> Key: GROOVY-8531
> URL: https://issues.apache.org/jira/browse/GROOVY-8531
> Project: Groovy
> Issue Type: Task
> Affects Versions: 3.0.0-alpha-1, 2.5.0-beta-3, 2.6.0-alpha-3, 2.4.15
> Reporter: Daniel Sun
> Priority: Major
>
> I am trying to write a hadoop example in Groovy and find groovy can not resolve type defined in super class written in Java:
> *Groovy version(qualified class name required. Note: Reducer is written in Java)*
> [https://github.com/danielsun1106/hadoop-wordcount/blob/master/src/main/groovy/me/sunlan/hadooplabs/wordcount/GroovyWordCount.groovy#L36]
> *Java version(Only class name)*
> [https://github.com/danielsun1106/hadoop-wordcount/blob/master/src/main/java/me/sunlan/hadooplabs/wordcount/WordCount.java#L39]
> In the meanwhile, I find the issue does *not* exist if super class is written in Groovy too:
> {code:java}
> class Reducer {
> public abstract class Context {}
> }
> class Example extends Reducer {
> public void reduce(Context context) {}
> }
> new Example().reduce(null)
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)