You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Uwe Schindler (JIRA)" <ji...@apache.org> on 2010/04/10 20:00:51 UTC

[jira] Created: (LUCENE-2389) Enforce TokenStream impl / Analyzer finalness by an assertion

Enforce TokenStream impl / Analyzer finalness by an assertion
-------------------------------------------------------------

                 Key: LUCENE-2389
                 URL: https://issues.apache.org/jira/browse/LUCENE-2389
             Project: Lucene - Java
          Issue Type: Improvement
            Reporter: Uwe Schindler
            Assignee: Uwe Schindler


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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2389) Enforce TokenStream impl / Analyzer finalness by an assertion

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2389:
----------------------------------

    Attachment: LUCENE-2389.patch

Improved patch that also makes Analyzers with final (reusable)TokenStream() possible.

> Enforce TokenStream impl / Analyzer finalness by an assertion
> -------------------------------------------------------------
>
>                 Key: LUCENE-2389
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2389
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1
>
>         Attachments: LUCENE-2389.patch, LUCENE-2389.patch
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2389) Enforce TokenStream impl / Analyzer finalness by an assertion

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2389:
----------------------------------

    Fix Version/s: 3.1

> Enforce TokenStream impl / Analyzer finalness by an assertion
> -------------------------------------------------------------
>
>                 Key: LUCENE-2389
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2389
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2389) Enforce TokenStream impl / Analyzer finalness by an assertion

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2389:
----------------------------------

    Attachment: LUCENE-2389.patch

Patch.

> Enforce TokenStream impl / Analyzer finalness by an assertion
> -------------------------------------------------------------
>
>                 Key: LUCENE-2389
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2389
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1
>
>         Attachments: LUCENE-2389.patch
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Resolved: (LUCENE-2389) Enforce TokenStream impl / Analyzer finalness by an assertion

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler resolved LUCENE-2389.
-----------------------------------

    Resolution: Fixed

Committed revision: 932864

> Enforce TokenStream impl / Analyzer finalness by an assertion
> -------------------------------------------------------------
>
>                 Key: LUCENE-2389
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2389
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1
>
>         Attachments: LUCENE-2389.patch, LUCENE-2389.patch
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org