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

Digy commented on LUCENENET-433:
--------------------------------

Here is the test case
{code}
        [Test]
        public void Test_LUCENE_3042_LUCENENET_433()
        {
            String testString = "t";

            Analyzer analyzer = new 
Lucene.Net.Analysis.Standard.StandardAnalyzer();
            TokenStream stream = analyzer.ReusableTokenStream("dummy", new 
System.IO.StringReader(testString));
            stream.Reset();
            while (stream.IncrementToken())
            {
                // consume
            }
            stream.End();
            stream.Close();

            AssertAnalyzesToReuse(analyzer, testString, new String[] { "t" });
        }
{code}

> AttributeSource can have an invalid computed state (LUCENE-3042)
> ----------------------------------------------------------------
>
>                 Key: LUCENENET-433
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-433
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Digy
>             Fix For: Lucene.Net 2.9.4, Lucene.Net 2.9.4g
>
>
> If you work a tokenstream, consume it, then reuse it and add an attribute to 
> it, the computed state is wrong.
> thus for example, clearAttributes() will not actually clear the attribute 
> added.
> So in some situations, addAttribute is not actually clearing the computed 
> state when it should.
> https://issues.apache.org/jira/browse/LUCENE-3042

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

        

Reply via email to