accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bob Thorman (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ACCUMULO-2131) while statement used as if statement
Date Mon, 06 Apr 2015 14:56:12 GMT

     [ https://issues.apache.org/jira/browse/ACCUMULO-2131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Bob Thorman updated ACCUMULO-2131:
----------------------------------
    Attachment: ACCUMULO-2131.patch

ACCUMULO-2131 fixed by changing while to an if

> 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
>            Priority: Trivial
>              Labels: newbie
>             Fix For: 1.8.0, 1.7.1
>
>         Attachments: ACCUMULO-2131.patch
>
>
> 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.3.4#6332)

Mime
View raw message