[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14086493#comment-14086493
 ] 

Raul Gutierrez Segales commented on ZOOKEEPER-1235:
---------------------------------------------------

Patch lgtm, +1 (much needed cleanup!). 

> store KeeperException messages in the Code enum
> -----------------------------------------------
>
>                 Key: ZOOKEEPER-1235
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1235
>             Project: ZooKeeper
>          Issue Type: Sub-task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>             Fix For: 3.5.1
>
>         Attachments: ZOOKEEPER-1235.patch, ZOOKEEPER-1235.patch
>
>
> 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()



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to