zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject zookeeper git commit: ZOOKEEPER-2729: Cleanup findbug warnings in branch-3.4: Correctness Warnings
Date Sat, 08 Apr 2017 22:31:33 GMT
Repository: zookeeper
Updated Branches:
  refs/heads/branch-3.4 a1b39d4a1 -> fa718b93f


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

Author: Abraham Fine <afine@apache.org>

Reviewers: Michael Han <hanm@apache.org>

Closes #220 from afine/ZOOKEEPER-2729


Project: http://git-wip-us.apache.org/repos/asf/zookeeper/repo
Commit: http://git-wip-us.apache.org/repos/asf/zookeeper/commit/fa718b93
Tree: http://git-wip-us.apache.org/repos/asf/zookeeper/tree/fa718b93
Diff: http://git-wip-us.apache.org/repos/asf/zookeeper/diff/fa718b93

Branch: refs/heads/branch-3.4
Commit: fa718b93f22ce17a7f041b68bbfb2a74ac6d3dbe
Parents: a1b39d4
Author: Abraham Fine <afine@apache.org>
Authored: Sat Apr 8 15:31:41 2017 -0700
Committer: Michael Han <hanm@apache.org>
Committed: Sat Apr 8 15:31:41 2017 -0700

----------------------------------------------------------------------
 .../zookeeper/server/quorum/auth/SaslQuorumAuthLearner.java      | 4 +---
 .../zookeeper/server/quorum/auth/SaslQuorumAuthServer.java       | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zookeeper/blob/fa718b93/src/java/main/org/apache/zookeeper/server/quorum/auth/SaslQuorumAuthLearner.java
----------------------------------------------------------------------
diff --git a/src/java/main/org/apache/zookeeper/server/quorum/auth/SaslQuorumAuthLearner.java
b/src/java/main/org/apache/zookeeper/server/quorum/auth/SaslQuorumAuthLearner.java
index 2643808..9a38bb8 100644
--- a/src/java/main/org/apache/zookeeper/server/quorum/auth/SaslQuorumAuthLearner.java
+++ b/src/java/main/org/apache/zookeeper/server/quorum/auth/SaslQuorumAuthLearner.java
@@ -173,9 +173,7 @@ public class SaslQuorumAuthLearner implements QuorumAuthLearner {
         BufferedOutputStream bufferedOutput = new BufferedOutputStream(dout);
         BinaryOutputArchive boa = BinaryOutputArchive
                 .getArchive(bufferedOutput);
-        if (response != null && response.length < 0) {
-            throw new IOException("Response length < 0");
-        } else if (response == null) {
+        if (response == null) {
             authPacket = QuorumAuth.createPacket(
                     QuorumAuth.Status.IN_PROGRESS, response);
         } else {

http://git-wip-us.apache.org/repos/asf/zookeeper/blob/fa718b93/src/java/main/org/apache/zookeeper/server/quorum/auth/SaslQuorumAuthServer.java
----------------------------------------------------------------------
diff --git a/src/java/main/org/apache/zookeeper/server/quorum/auth/SaslQuorumAuthServer.java
b/src/java/main/org/apache/zookeeper/server/quorum/auth/SaslQuorumAuthServer.java
index 0a67b79..a64513a 100644
--- a/src/java/main/org/apache/zookeeper/server/quorum/auth/SaslQuorumAuthServer.java
+++ b/src/java/main/org/apache/zookeeper/server/quorum/auth/SaslQuorumAuthServer.java
@@ -167,9 +167,7 @@ public class SaslQuorumAuthServer implements QuorumAuthServer {
         BinaryOutputArchive boa = BinaryOutputArchive
                 .getArchive(bufferedOutput);
         QuorumAuthPacket authPacket;
-        if (challenge != null && challenge.length < 0) {
-            throw new IOException("Response length < 0");
-        } else if (challenge == null && s != QuorumAuth.Status.SUCCESS) {
+        if (challenge == null && s != QuorumAuth.Status.SUCCESS) {
             authPacket = QuorumAuth.createPacket(
                     QuorumAuth.Status.IN_PROGRESS, challenge);
         } else {


Mime
View raw message