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

Robert Muir commented on LUCENE-3969:
-------------------------------------

thats nice!

{quote}
Its still a little bit ugly how the three special cases are handled (and the 
Sets need to be kept in sync!), but at least the standard types are created 
very simple.
{quote}

Yeah but thats only the exceptional cases, so its no big deal.

I tested the patch, by adding a fake ctor with an unsupported type to 
BulgarianStemFilter:
{noformat}
public BulgarianStemFilter(final TokenStream input, BitSet ignored) {
   super(input);
 }
{noformat}

Test failed nicely at startup:
{noformat}
[junit] Caused by: java.lang.AssertionError: public 
org.apache.lucene.analysis.bg.BulgarianStemFilter(org.apache.lucene.analysis.TokenStream,java.util.BitSet)
 has unsupported parameter types
{noformat}

Thanks Uwe!

                
> Use all (non-deprecated) analysis ctors in TestRandomChains
> -----------------------------------------------------------
>
>                 Key: LUCENE-3969
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3969
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: modules/analysis
>            Reporter: Robert Muir
>         Attachments: LUCENE-3969.patch, LUCENE-3969.patch, LUCENE-3969.patch, 
> LUCENE-3969.patch, LUCENE-3969.patch, LUCENE-3969.patch
>
>
> We made TestRandomChains in LUCENE-3919, which reflects all
> analysis components from the classpath and builds analyzers from them,
> then checks consistency.
> but currently it only supports some tokenizers/tokenfilters/charfilters,
> because it hardcodes at certain ctors e.g. Tokenizer(Reader) and 
> Tokenizer(Version+Reader).
> Instead we should use all ctors, just filling them in with random data of
> whatever argument type they take.

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

        

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

Reply via email to