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

ASF GitHub Bot commented on ZOOKEEPER-2628:
-------------------------------------------

Github user eribeiro commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/102#discussion_r87027160
  
    --- Diff: 
src/java/main/org/apache/zookeeper/server/quorum/flexible/QuorumHierarchical.java
 ---
    @@ -344,9 +345,10 @@ public boolean containsQuorum(Set<Long> set){
              * Check if all groups have majority
              */
             int majGroupCounter = 0;
    -        for(long gid : expansion.keySet()) {
    -            LOG.debug("Group info: " + expansion.get(gid) + ", " + gid + 
", " + groupWeight.get(gid));
    -            if(expansion.get(gid) > (groupWeight.get(gid) / 2) )
    +        for (Entry<Long, Long> entry : expansion.entrySet()) {
    +            Long gid = entry.getKey();
    +            LOG.debug("Group info: " + entry.getValue() + ", " + gid + ", 
" + groupWeight.get(gid));
    --- End diff --
    
    We could use modern LOG printing here: 
    
    ``
    LOG.debug("Group info: {}, {}, {}", entry.getValue(), gid, 
groupWeight.get(gid));
    ``


> Investigate and fix findbug warnings
> ------------------------------------
>
>                 Key: ZOOKEEPER-2628
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2628
>             Project: ZooKeeper
>          Issue Type: Bug
>    Affects Versions: 3.5.2
>            Reporter: Michael Han
>             Fix For: 3.5.3
>
>
> Findbug tool used by Jenkins bot is upgraded to 3.0.1 from 2.0.3 according to 
> Infra team, and this leads to 20 new warnings produced by findbug. The 
> warning reports can be found on [pre commit 
> builds|https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/] with build 
> number >= 3513. These warnings need to be triaged and fixed if they are 
> legitimate.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to