[ https://issues.apache.org/jira/browse/ZOOKEEPER-2729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15960195#comment-15960195 ]
ASF GitHub Bot commented on ZOOKEEPER-2729: ------------------------------------------- Github user afine commented on the issue: https://github.com/apache/zookeeper/pull/220 @rakeshadr @hanm Both of the findbugs related issues here appear to be from from ZOOKEEPER-1045. There were checks for an array length of less than zero `if (response != null && response.length < 0) {`. According to the java spec (http://docs.oracle.com/javase/specs/jls/se7/html/jls-10.html#jls-10.7) this is an impossible condition. >The public final field length, which contains the number of components of the array. length may be positive or zero. So I just remove the clause from the if block, please let me know if I am missing something. > Cleanup findbug warnings in branch-3.4: Correctness Warnings > ------------------------------------------------------------ > > Key: ZOOKEEPER-2729 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2729 > Project: ZooKeeper > Issue Type: Sub-task > Affects Versions: 3.4.9 > Reporter: Rakesh R > Assignee: Abraham Fine > Fix For: 3.4.11 > > > {code} > (1) INT Bad comparison of nonnegative value with 0 in > org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream, > byte[]) > Bug type INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE (click for details) > In class org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner > In method > org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream, > byte[]) > Value 0 > At SaslQuorumAuthLearner.java:[line 176] > (2) INT Bad comparison of nonnegative value with 0 in > org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthServer.send(DataOutputStream, > byte[], QuorumAuth$Status) > Bug type INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE (click for details) > In class org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthServer > In method > org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthServer.send(DataOutputStream, > byte[], QuorumAuth$Status) > Value 0 > At SaslQuorumAuthServer.java:[line 170] > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)