You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by "Ryanne Dolan (JIRA)" <ji...@apache.org> on 2015/10/07 20:26:26 UTC

[jira] [Created] (SAMZA-791) KafkaSystemFactory narrows return types

Ryanne Dolan created SAMZA-791:
----------------------------------

             Summary: 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
            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)