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

Refactor TopicCommand to remove redundant if/else statements

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.10.0.1
    • Fix Version/s: 0.10.1.0
    • Component/s: admin
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: