You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "Christopher Tubbs (Jira)" <ji...@apache.org> on 2020/08/10 15:45:00 UTC

[jira] [Updated] (ZOOKEEPER-3910) zkServer.sh code format is oldfashioned and chaotic

     [ https://issues.apache.org/jira/browse/ZOOKEEPER-3910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christopher Tubbs updated ZOOKEEPER-3910:
-----------------------------------------
    Description: 
Replaced old comparison of vars, usually used in sh.

Since the script is now pure bash, it's better to use more standard comparators to improve readability, like 

 
{code:java}
[ -z $var ] 
{code}
instead of
{code:java}
[ "x$var" = "x" ]{code}
Also equalized a bit the indentation and format of "if" statements in the script.

This will improve readability, as pointed out above, and make it easier to maintain

 

  was:
Replaced old comparison of vars, usually used in sh.

Since the script is now pure bash, it's better to use more standard comparators to improve readability, like 

 
{code:java}
[ -n $var ] 
{code}
instead of
{code:java}
[ "x$var" = "x" ]{code}
Also equalized a bit the indentation and format of "if" statements in the script.

This will improve readability, as pointed out above, and make it easier to maintain

 


> zkServer.sh code format is oldfashioned and chaotic
> ---------------------------------------------------
>
>                 Key: ZOOKEEPER-3910
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3910
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: scripts
>    Affects Versions: 3.5.5, 3.5.6, 3.5.7, 3.6.1, 3.5.8
>            Reporter: Diego Lucas Jiménez
>            Priority: Minor
>
> Replaced old comparison of vars, usually used in sh.
> Since the script is now pure bash, it's better to use more standard comparators to improve readability, like 
>  
> {code:java}
> [ -z $var ] 
> {code}
> instead of
> {code:java}
> [ "x$var" = "x" ]{code}
> Also equalized a bit the indentation and format of "if" statements in the script.
> This will improve readability, as pointed out above, and make it easier to maintain
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)