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

Aleksandar Bircakovic commented on SAMZA-791:
---------------------------------------------

RB: https://reviews.apache.org/r/39130/

> KafkaSystemFactory narrows return types
> ---------------------------------------
>
>                 Key: SAMZA-791
>                 URL: https://issues.apache.org/jira/browse/SAMZA-791
>             Project: Samza
>          Issue Type: Bug
>          Components: kafka
>            Reporter: Ryanne Dolan
>            Assignee: Aleksandar Bircakovic
>            Priority: Trivial
>
> I KafkaSystemFactory, the return types of each method are narrowed from the 
> SystemFactory interface:
> SystemProducer -> KafkaSystemProducer
> SystemConsumer -> KafkaSystemConsumer
> SystemAdmin -> KafkaSystemAdmin
> This makes it unnecessarily difficult to sub-class KafkaSystemFactory.
> The fix: specify return types when defining these methods, e.g. 
>   def getProducer(systemName: String, config: Config, registry: 
> MetricsRegistry) = ...
> should be:
>   def getProducer(systemName: String, config: Config, registry: 
> MetricsRegistry): *SystemProducer* = ...



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

Reply via email to