Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-1198 Refactorings and Cleanups
  3. ZOOKEEPER-1235

store KeeperException messages in the Code enum

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      Enums are just objects that can have properties. So instead of switching on the code integer, the message can be stored in the enum.

      OK( OK) becomes OK (Ok, "ok")

      getCodeMessage(Code code) just returns code.getMessage()

      Attachments

        1. ZOOKEEPER-1235.patch
          8 kB
          Michi Mutsuzaki
        2. ZOOKEEPER-1235.patch
          7 kB
          Thomas Koch

        Activity

          People

            thkoch Thomas Koch
            thkoch Thomas Koch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: