geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GEODE-336) Function extends Identifiable without specifying generics type for Identifiable
Date Tue, 19 Apr 2016 18:20:25 GMT

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

ASF subversion and git services commented on GEODE-336:
-------------------------------------------------------

Commit 73c9825ff0853684d2208a65d94a3689e7c7c02f in incubator-geode's branch refs/heads/feature/GEODE-1233
from [~upthewaterspout]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;h=73c9825 ]

GEODE-336: Make Function extends Identifiable<String>

Function was extending Identifiable without specifying the generic
type.


> Function extends Identifiable without specifying generics type for Identifiable
> -------------------------------------------------------------------------------
>
>                 Key: GEODE-336
>                 URL: https://issues.apache.org/jira/browse/GEODE-336
>             Project: Geode
>          Issue Type: Bug
>            Reporter: Konstantin Ignatyev
>            Assignee: Dan Smith
>            Priority: Critical
>             Fix For: 1.0.0-incubating.M3
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> Function interface is defined as 
> public interface Function extends Identifiable { 
>    public String getId();
> ...}
> but that is not correct because Identifiable requires type parameter 
> public interface Identifiable<T extends Comparable<T>> extends Serializable
{ 
>    public T getId();
> }
> so when custom function is defined as 
> class SomeFunction extends FunctionAdapter {
>   override def getId:String = "SomeFunction-v1"
> }
> Java compiler tolerates that, but Scala compiler refuses to compile because  because
String is not compatible with 'Nothing' that is expected from getId because Function extends
Identifiable without specifying type.
> Solution:
> define Function as
> public interface Function extends Identifiable<String> 



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

Mime
View raw message