Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-7772

Simplify hasNext in PageableLuceneQueryResultsImpl

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.13.0
    • Component/s: lucene

      Description

      The if statement in the hasNext() method can be simplified by condensing into a single line return statement.

      See here:

      https://github.com/apache/geode/blob/182de42d8e56a900f0d22793a440af72f62f09f4/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/PageableLuceneQueryResultsImpl.java#L149 

      Example, and possibly correct fix:

      return !currentPage.isEmpty();

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mkevo Mario Kevo
                Reporter:
                jasonhuynh Jason Huynh
              • Votes:
                0 Vote for this issue
                Watchers:
                2 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 - 20m
                  20m