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

Enforce TokenStream impl / Analyzer finalness by an assertion

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.1, 4.0-ALPHA
    • None
    • None
    • New, Patch Available

    Description

      As noted in LUCENE-1753 and other issues, TokenStream and Analyzers are based on the decorator pattern. At least all TokenStream and Analyzer implementations in Lucene and Solr should be final.

      The attached patch adds an assertion to the ctors of both classes that does the corresponding checks:

      • Analyzers must be final or private classes or anonymous inner classes
      • TokenStreams must be final or private classes or anonymous inner classes or have a final incrementToken()

      I will commit this after robert have fixed solr streams.

      Attachments

        Issue Links

          Activity

            People

              uschindler Uwe Schindler
              uschindler Uwe Schindler
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: