You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Benjamin Reed (Commented) (JIRA)" <ji...@apache.org> on 2011/10/18 20:31:10 UTC
[jira] [Commented] (ZOOKEEPER-1231) refactor int constants in
o.a.z.s.q.Leader to enum
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13129915#comment-13129915 ]
Benjamin Reed commented on ZOOKEEPER-1231:
------------------------------------------
i don't think this is a good idea. we always use them as numbers, while it does help a bit with type checking, i don't think it makes the code more readable. so, i don't think the overhead is worth it.
> refactor int constants in o.a.z.s.q.Leader to enum
> --------------------------------------------------
>
> Key: ZOOKEEPER-1231
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1231
> Project: ZooKeeper
> Issue Type: Sub-task
> Reporter: Thomas Koch
> Assignee: Thomas Koch
>
> There are a couple of magic number in Leader, representing QuorumPackage types, like DIFF, TRUNC, SNAP, OBSERVERINFO, NEWLEADER, FOLLOWERINFO... These should rather be made an enum.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira