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

Navina Ramesh commented on SAMZA-791:
-------------------------------------

lgtm. +1

> 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
>         Attachments: SAMZA-791.0.patch
>
>
> 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