Uploaded image for project: 'Samza'
  1. Samza
  2. SAMZA-791

KafkaSystemFactory narrows return types

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.10.0
    • Component/s: kafka
    • Labels:
      None

      Description

      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 = ...

        Attachments

        1. SAMZA-791.0.patch
          2 kB
          Aleksandar Bircakovic

          Activity

            People

            • Assignee:
              a.bircakovic Aleksandar Bircakovic
              Reporter:
              ryannedolan Ryanne Dolan
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: