You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2011/09/14 18:41:09 UTC

[jira] [Commented] (LUCENE-3434) Make ShingleAnalyzerWrapper and PerFieldAnalyzerWrapper immutable

    [ https://issues.apache.org/jira/browse/LUCENE-3434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104646#comment-13104646 ] 

Robert Muir commented on LUCENE-3434:
-------------------------------------

I think you can remove the suppresswarnings and use Collections.emptyMap() instead of Collections.EMPTY_MAP ?

> Make ShingleAnalyzerWrapper and PerFieldAnalyzerWrapper immutable
> -----------------------------------------------------------------
>
>                 Key: LUCENE-3434
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3434
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: modules/analysis
>            Reporter: Chris Male
>         Attachments: LUCENE-3434-3x.patch, LUCENE-3434-trunk.patch
>
>
> Both ShingleAnalyzerWrapper and PerFieldAnalyzerWrapper have setters which change some state which impacts their analysis stack.  If these are going to become reusable, then the state must be immutable as changing it will have no effect.
> Process will be similar to QueryAutoStopWordAnalyzer, I will remove in trunk and deprecate in 3x.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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