You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by an...@apache.org on 2020/01/09 21:51:59 UTC

[zookeeper] branch master updated: ZOOKEEPER-3649: Add a line break in ls -s CLI

This is an automated email from the ASF dual-hosted git repository.

andor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zookeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new 570285a  ZOOKEEPER-3649: Add a line break in ls -s CLI
570285a is described below

commit 570285af427fd69471a682a071a47483f8f7ddf8
Author: ravowlga123 <ra...@gmail.com>
AuthorDate: Thu Jan 9 22:51:51 2020 +0100

    ZOOKEEPER-3649: Add a line break in ls -s CLI
    
    As per the ticket [ZOOKEEEPER-3649](https://issues.apache.org/jira/browse/ZOOKEEPER-3649) we need to add line break ls -s command.
    
    To achieve the desired behavior I have added new line character in option.add of  LsCommand.printChildren(). Please do let me know if made changes gives us the desired behavior or if anything else needs to be changed.
    
    Author: ravowlga123 <ra...@gmail.com>
    
    Reviewers: eolivelli@apache.org, andor@apache.org
    
    Closes #1183 from ravowlga123/ZOOKEEPER-3649 and squashes the following commits:
    
    f2e1997d6 [ravowlga123] ZOOKEEPER-3649 Removed additional new line from printChildren
    b36d63664 [ravowlga123] ZOOKEEPER-3649 Add a line break in ls -s CLI
---
 zookeeper-server/src/main/java/org/apache/zookeeper/cli/LsCommand.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/zookeeper-server/src/main/java/org/apache/zookeeper/cli/LsCommand.java b/zookeeper-server/src/main/java/org/apache/zookeeper/cli/LsCommand.java
index 9ac942c..b12a12a 100644
--- a/zookeeper-server/src/main/java/org/apache/zookeeper/cli/LsCommand.java
+++ b/zookeeper-server/src/main/java/org/apache/zookeeper/cli/LsCommand.java
@@ -127,11 +127,10 @@ public class LsCommand extends CliCommand {
             }
             out.append(child);
         }
-        out.append("]");
+        out.append("]\n");
         if (stat != null) {
             new StatPrinter(out).print(stat);
         }
-        out.append("\n");
     }
 
 }