Skip to content

ZOOKEEPER-2729: Cleanup findbug warnings in branch-3.4: Correctness Warnings#220

Closed
afine wants to merge 1 commit intoapache:branch-3.4from
afine:ZOOKEEPER-2729
Closed

ZOOKEEPER-2729: Cleanup findbug warnings in branch-3.4: Correctness Warnings#220
afine wants to merge 1 commit intoapache:branch-3.4from
afine:ZOOKEEPER-2729

Conversation

@afine
Copy link
Contributor

@afine afine commented Apr 7, 2017

No description provided.

@afine
Copy link
Contributor Author

afine commented Apr 7, 2017

@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.

@afine
Copy link
Contributor Author

afine commented Apr 7, 2017

The javadoc warning from jenkins appears to be unrelated to the patch:

[javadoc] /home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/src/java/main/org/apache/zookeeper/server/PurgeTxnLog.java:207: warning - @return tag has no arguments.

The new findbugs appears to be incorrect as well.

@hanm
Copy link
Contributor

hanm commented Apr 8, 2017

lgtm.

asfgit pushed a commit that referenced this pull request Apr 8, 2017
…arnings

Author: Abraham Fine <afine@apache.org>

Reviewers: Michael Han <hanm@apache.org>

Closes #220 from afine/ZOOKEEPER-2729
@hanm
Copy link
Contributor

hanm commented Apr 8, 2017

merged, please close pr @afine.

@afine afine closed this Apr 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants