You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by MIS <mi...@gmail.com> on 2011/02/17 19:10:15 UTC

Minor improvements in Zookeeper code

In the file *org.apache.zookeeper.server.quorum.FastLeaderElection*.java for
methods like totalOrderPredicate and termPredicate, which return boolean,
the code is as below :

if (condition)
      return true;
else
      return false;

I feel, it would be better if the condition itself is returned.
i.e., return condition.

The same thing holds good else where if applicable.

Thanks,
MIS

Re: Minor improvements in Zookeeper code

Posted by Mahadev Konar <ma...@apache.org>.
Hi MIS,
 Can you please open a jira on
https://issues.apache.org/jira/browse/ZOOKEEPER and file a patch.
Please take a look at
https://cwiki.apache.org/confluence/display/ZOOKEEPER/HowToContribute
on how to contribute.

thanks
mahadev

On Thu, Feb 17, 2011 at 10:10 AM, MIS <mi...@gmail.com> wrote:
> In the file *org.apache.zookeeper.server.quorum.FastLeaderElection*.java for
> methods like totalOrderPredicate and termPredicate, which return boolean,
> the code is as below :
>
> if (condition)
>      return true;
> else
>      return false;
>
> I feel, it would be better if the condition itself is returned.
> i.e., return condition.
>
> The same thing holds good else where if applicable.
>
> Thanks,
> MIS
>