Uploaded image for project: 'Accumulo'
  1. Accumulo
  2. ACCUMULO-2131

while statement used as if statement

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 1.7.0
    • tserver

    Description

      Going through PMD output, and this looks a little sketchy in SourceSwitchingIterator.java:

        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;
        }
      

      I'm wondering if that "while" should be "if"

      Attachments

        1. ACCUMULO-2131.patch
          1 kB
          Bob Thorman
        2. 0001-ACCUMULO-2131-Ensure-source-is-re-checked-for-being-.patch
          1 kB
          Christopher Tubbs

        Activity

          People

            bthorman Bob Thorman
            ecn Eric C. Newton
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 10m
                10m