Lucene - Core
  1. Lucene - Core
  2. LUCENE-2389

Enforce TokenStream impl / Analyzer finalness by an assertion

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1, 4.0-ALPHA
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      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.

        Issue Links

          Activity

          Grant Ingersoll made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Mark Thomas made changes -
          Workflow Default workflow, editable Closed status [ 12563566 ] jira [ 12585155 ]
          Mark Thomas made changes -
          Workflow jira [ 12508055 ] Default workflow, editable Closed status [ 12563566 ]
          Uwe Schindler made changes -
          Fix Version/s 4.0.0 [ 12314822 ]
          Uwe Schindler made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Uwe Schindler made changes -
          Link This issue incorporates SOLR-1876 [ SOLR-1876 ]
          Uwe Schindler made changes -
          Attachment LUCENE-2389.patch [ 12441358 ]
          Uwe Schindler made changes -
          Attachment LUCENE-2389.patch [ 12441343 ]
          Uwe Schindler made changes -
          Link This issue relates to LUCENE-2372 [ LUCENE-2372 ]
          Uwe Schindler made changes -
          Link This issue relates to LUCENE-1753 [ LUCENE-1753 ]
          Uwe Schindler made changes -
          Field Original Value New Value
          Fix Version/s 3.1 [ 12314025 ]
          Uwe Schindler created issue -

            People

            • Assignee:
              Uwe Schindler
              Reporter:
              Uwe Schindler
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development