Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-2757

Incorrect path crashes zkCli

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.5.3
    • 3.5.4, 3.6.0
    • None
    • None

    Description

      If I try delete test without the leading /, then the CLI crashes with this exception:

      Exception in thread "main" java.lang.IllegalArgumentException: Path must start with / character
      	at org.apache.zookeeper.common.PathUtils.validatePath(PathUtils.java:51)
      	at org.apache.zookeeper.ZooKeeper.delete(ZooKeeper.java:1659)
      	at org.apache.zookeeper.cli.DeleteCommand.exec(DeleteCommand.java:83)
      	at org.apache.zookeeper.ZooKeeperMain.processZKCmd(ZooKeeperMain.java:655)
      	at org.apache.zookeeper.ZooKeeperMain.processCmd(ZooKeeperMain.java:586)
      	at org.apache.zookeeper.ZooKeeperMain.executeLine(ZooKeeperMain.java:370)
      	at org.apache.zookeeper.ZooKeeperMain.run(ZooKeeperMain.java:330)
      	at org.apache.zookeeper.ZooKeeperMain.main(ZooKeeperMain.java:292)
      

      It should really fail the operation rather than crash the CLI.

      Attachments

        Issue Links

          Activity

            People

              abrahamfine Abraham Fine
              fpj Flavio Paiva Junqueira
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: