You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Shuai Zhang (JIRA)" <ji...@apache.org> on 2016/08/17 09:25:20 UTC
[jira] [Created] (KAFKA-4053) Refactor TopicCommand to remove
redundant if/else statements
Shuai Zhang created KAFKA-4053:
----------------------------------
Summary: Refactor TopicCommand to remove redundant if/else statements
Key: KAFKA-4053
URL: https://issues.apache.org/jira/browse/KAFKA-4053
Project: Kafka
Issue Type: Improvement
Components: admin
Affects Versions: 0.10.0.1
Reporter: Shuai Zhang
Priority: Minor
Fix For: 0.10.0.2
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)```
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)