Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9FF67200C5F for ; Sun, 9 Apr 2017 00:31:35 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9E929160B96; Sat, 8 Apr 2017 22:31:35 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E5D04160B93 for ; Sun, 9 Apr 2017 00:31:34 +0200 (CEST) Received: (qmail 17532 invoked by uid 500); 8 Apr 2017 22:31:34 -0000 Mailing-List: contact commits-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list commits@zookeeper.apache.org Received: (qmail 17521 invoked by uid 99); 8 Apr 2017 22:31:34 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Apr 2017 22:31:34 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DA4FFDFF73; Sat, 8 Apr 2017 22:31:33 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: hanm@apache.org To: commits@zookeeper.apache.org Message-Id: <811d8df2123e4c698055bacc1eb8b714@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: zookeeper git commit: ZOOKEEPER-2729: Cleanup findbug warnings in branch-3.4: Correctness Warnings Date: Sat, 8 Apr 2017 22:31:33 +0000 (UTC) archived-at: Sat, 08 Apr 2017 22:31:35 -0000 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 Reviewers: Michael Han 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 Authored: Sat Apr 8 15:31:41 2017 -0700 Committer: Michael Han 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 {