[ 
https://issues.apache.org/jira/browse/LUCENENET-150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Digy closed LUCENENET-150.
--------------------------

    Resolution: Fixed
      Assignee: Digy

Overriding not implemented methods of StringReader  and throwing exceptions in 
them (as in DocumentsWriter.patch) resulted in failing of some Nunit tests.
Therefore, I added only one method to DocumentsWriter.ReusableStringReader
{code}
public override string ReadToEnd()
{
       if (left == 0) return null;
       left = 0;
       return s;
}
{code}

DIGY


> DocumentsWriter.ReusableStringReader   does not implement some methods of 
> StringReader
> --------------------------------------------------------------------------------------
>
>                 Key: LUCENENET-150
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-150
>             Project: Lucene.Net
>          Issue Type: Improvement
>         Environment: Lucene.Net 2.3.1
>            Reporter: Digy
>            Assignee: Digy
>            Priority: Minor
>         Attachments: DocumentsWriter.patch, TestReusableStringReader.cs
>
>
> Lucene.Net users writing custom analyzers may get unexpected results  since 
> some methods of StringReader
> (ReadBlock, ReadLine, Peek, ReadToEnd etc.)are not implemented in 
> DocumentsWriter.ReusableStringReader.
> For ex, Calling ReadToEnd in a custom tokenizer class -although it contains 
> some text- returns an 
> empty string without informing user. 
> I will attach a test case and a patch for DocumentsWriter including previous 
> patches.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to