Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-Dev

[jira] [Comment Edited] (LUCENE-4321) java.io.FilterReader considered harmful

 

 

Lucene java-dev RSS feed   Index | Next | Previous | View Threaded


jira at apache

Aug 22, 2012, 7:51 AM

Post #1 of 1 (39 views)
Permalink
[jira] [Comment Edited] (LUCENE-4321) java.io.FilterReader considered harmful

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

Uwe Schindler edited comment on LUCENE-4321 at 8/23/12 1:51 AM:
----------------------------------------------------------------

I am just thinking about markSupported(), mark(), reset(): Lucene does not use those methods at all and implementing this shit correctly with offsets is to heavy. I would return false for markSupported, and let mark() and reset() be unimplented (no-op for mark()) or throw IOEx (for reset()). ready() can be delegated, thats fine. - and make final?

was (Author: thetaphi):
I am just thinking about markSupported(), mark(), reset(): Lucene does not use those methods at all and implementing this shit correctly with offsets is to heavy. I would return false for markSupported, and let mark() and reset() be unimplented (no-op for mark()) or throw IOEx (for reset()). ready() can be delegated, thats fine.

> java.io.FilterReader considered harmful
> ---------------------------------------
>
> Key: LUCENE-4321
> URL: https://issues.apache.org/jira/browse/LUCENE-4321
> Project: Lucene - Core
> Issue Type: Bug
> Affects Versions: 4.0-BETA
> Reporter: Robert Muir
> Fix For: 5.0, 4.0
>
> Attachments: LUCENE-4321.patch, LUCENE-4321.patch, LUCENE-4321.patch, LUCENE-4321.patch
>
>
> See Dawid's email: http://find.searchhub.org/document/64b0a28c53faf39
> Reader.java is fine, it has lots of methods like read(), read(char[]), read(CharBuffer), skip(), but these all have default implementations delegating to read(char[], int, int).
> Unfortunately FilterReader delegates too many unnecessary things such as read() and skip() in a broken way. It should have just left these alone.
> This can cause traps for someone upgrading because they have to override multiple methods, when read(char[], int, int) should be enough, and all Reader methods will then work correctly.

--
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-unsubscribe [at] lucene
For additional commands, e-mail: dev-help [at] lucene

Lucene java-dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.