Return-Path: X-Original-To: apmail-accumulo-notifications-archive@minotaur.apache.org Delivered-To: apmail-accumulo-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0292E10558 for ; Tue, 4 Feb 2014 00:01:37 +0000 (UTC) Received: (qmail 13660 invoked by uid 500); 4 Feb 2014 00:01:24 -0000 Delivered-To: apmail-accumulo-notifications-archive@accumulo.apache.org Received: (qmail 13597 invoked by uid 500); 4 Feb 2014 00:01:17 -0000 Mailing-List: contact notifications-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@apache.org Delivered-To: mailing list notifications@accumulo.apache.org Received: (qmail 13559 invoked by uid 99); 4 Feb 2014 00:01:14 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Feb 2014 00:01:14 +0000 Date: Tue, 4 Feb 2014 00:01:14 +0000 (UTC) From: "John Vines (JIRA)" To: notifications@accumulo.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ACCUMULO-2131) while statement used as if statement MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ACCUMULO-2131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13890150#comment-13890150 ] John Vines commented on ACCUMULO-2131: -------------------------------------- I'm wondering if this bug is a good case of 'let sleeping dogs lie'... > while statement used as if statement > ------------------------------------ > > Key: ACCUMULO-2131 > URL: https://issues.apache.org/jira/browse/ACCUMULO-2131 > Project: Accumulo > Issue Type: Bug > Components: tserver > Reporter: Eric Newton > Assignee: Keith Turner > Priority: Trivial > Fix For: 1.6.0 > > > Going through PMD output, and this looks a little sketchy in SourceSwitchingIterator.java: > {noformat} > private boolean switchSource() throws IOException { > while (!source.isCurrent()) { > source = source.getNewDataSource(); > iter = source.iterator(); > if (iflag != null) > ((InterruptibleIterator) iter).setInterruptFlag(iflag); > > return true; > } > > return false; > } > {noformat} > I'm wondering if that "while" should be "if" -- This message was sent by Atlassian JIRA (v6.1.5#6160)