Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-3106

commongrams filter calls incrementToken() after it returns false

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.2, 4.0-ALPHA
    • modules/analysis
    • None
    • New

    Description

      In LUCENE-3064, we beefed up MockTokenizer with assertions, and I started cutting over some analysis tests to use MockTokenizer for better coverage.

      The commongrams tests fail, because they call incrementToken() after it already returns false.

      In general its my understanding consumers should not do this (and i know of a few tokenizers that will actually throw exceptions if you do this, just like java iterators and such).

      Attachments

        1. LUCENE-3106_test.patch
          5 kB
          Robert Muir
        2. LUCENE-3106.patch
          6 kB
          Robert Muir

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rcmuir Robert Muir
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Slack

                  Issue deployment