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

remove a useless throwing CliException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.5.7
    • 3.6.1, 3.5.8
    • None

    Description

      when I upgrade zookeeper from 3.4.13 to 3.5.7 in my application, I find the function processCmd in ZooKeeperMain.java is just like blow

      protected boolean processCmd(MyCommandOptions co) throws CliException, IOException, InterruptedException {
          boolean watch = false;
          try {
              watch = processZKCmd(co);
              exitCode = ExitCode.EXECUTION_FINISHED.getValue();
          } catch (CliException ex) {
              exitCode = ex.getExitCode();
              System.err.println(ex.getMessage());
          }
          return watch;
      }
      

      it throws CliException which has been caught in the funciton, so I think it can be removed.

      Attachments

        1. ZOOKEEPER-3760-1.patch
          2 kB
          Jinjiang Ling

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lingjinjiang Jinjiang Ling
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h