[ 
https://issues.apache.org/jira/browse/KAFKA-4053?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15425773#comment-15425773
 ] 

ASF GitHub Bot commented on KAFKA-4053:
---------------------------------------

GitHub user sh-z reopened a pull request:

    https://github.com/apache/kafka/pull/1751

    KAFKA-4053: remove redundant if/else statements in TopicCommand[WiP]

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sh-z/kafka KAFKA-4053

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/1751.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1751
    
----
commit 6e7458e03cb0725db6a7079466fd7fce4a2f7603
Author: Shuai Zhang <shuaizh...@ebay.com>
Date:   2016-08-17T09:29:54Z

    remove redundant if/else statements

----


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

Reply via email to