groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Sun (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (GROOVY-8531) Fail to resolve type defined in super class written in Java
Date Thu, 05 Apr 2018 15:04:00 GMT

    [ https://issues.apache.org/jira/browse/GROOVY-8531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16427067#comment-16427067
] 

Daniel Sun edited comment on GROOVY-8531 at 4/5/18 3:03 PM:
------------------------------------------------------------

Yep. We can import Reducer.Context explicitly, but this is not elegant:
 [https://github.com/danielsun1106/hadoop-wordcount/commit/df367812638d3814a2f9c3340fea3b09cc3b6a89]


was (Author: daniel_sun):
Yep. We can import Reducer.Context explicitly, but this is not elegant way:
https://github.com/danielsun1106/hadoop-wordcount/commit/df367812638d3814a2f9c3340fea3b09cc3b6a89

> 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 is 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 is enough)*
>  [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)

Mime
View raw message