Flavio Paiva Junqueira updated ZOOKEEPER-370:

    Attachment: ZOOKEEPER-370.patch

This patch:

1- makes a Random object in LeaderElection static to avoid using it only once 
with every election round;
2- It eliminates a call in QuorumCnxManager that is not necessary anymore 
3- It eliminates unecessary checks for null object in initiateConnection and 
receiveConnection in QuorumCnxManager. The object checked for null is used 
before and it will cause an exception to be thrown before reaching the checks. 
Consequently the checks are unnecessary and findbugs complains about them.

> Fix critical problems reported by findbugs
> ------------------------------------------
>                 Key: ZOOKEEPER-370
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-370
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: leaderElection
>    Affects Versions: 3.1.1
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>             Fix For: 3.2.0
>         Attachments: ZOOKEEPER-370.patch
> There are a couple of problems pointed out by findbugs and that we can easily 
> fix.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

Reply via email to