You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by "Digy (JIRA)" <ji...@apache.org> on 2008/09/10 23:46:44 UTC

[jira] Created: (LUCENENET-150) DocumentsWriter.ReusableStringReader does not implement some methods of StringReader

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
            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.


[jira] Updated: (LUCENENET-150) DocumentsWriter.ReusableStringReader does not implement some methods of StringReader

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

Digy updated LUCENENET-150:
---------------------------

    Attachment: TestReusableStringReader.cs

> 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
>            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.


[jira] Closed: (LUCENENET-150) DocumentsWriter.ReusableStringReader does not implement some methods of StringReader

Posted by "Digy (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Updated: (LUCENENET-150) DocumentsWriter.ReusableStringReader does not implement some methods of StringReader

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

Digy updated LUCENENET-150:
---------------------------

    Attachment: DocumentsWriter.patch

> 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
>            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.