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

Exceptions handling in methods of SegmentingTokenizerBase

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 8.6.3
    • None
    • modules/analysis
    • None
    • New

    Description

      The current interface of setNextSentence and incrementWord methods in SegmentingTokenizerBase do not define the checked exceptions, which makes it troublesome to be inherited.

      For example, if we override the incrementWord  with a logic that invoke  incrementToken on another tokenizer, the incrementToken raises the IOException but the incrementWord is not defined to handle it.

      I think having setNextSentence and incrementWord handle the IOException would make the SegmentingTokenizerBase easier to be used.

      Attachments

        Activity

          People

            Unassigned Unassigned
            huynmg Nguyen Minh Gia Huy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: