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

Code improvements

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.3.2, 3.3.3
    • 3.4.0
    • leaderElection
    • None
    • Linux box, Eclipse IDE,

    Description

      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.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mis MIS
            mis MIS
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

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

                Issue deployment