Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-4053

Refactor TopicCommand to remove redundant if/else statements

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.10.0.1
    • 0.10.1.0
    • admin
    • None

    Description

      In TopicCommand, there are a lot of redundant if/else statements, such as
      ```val ifNotExists = if (opts.options.has(opts.ifNotExistsOpt)) true else false```

      We can refactor it as the following statement:
      ```val ifNotExists = opts.options.has(opts.ifNotExistsOpt)```

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sh-z Shuai Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: