lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dawid Weiss (JIRA)" <>
Subject [jira] [Commented] (LUCENE-4321) considered harmful
Date Wed, 22 Aug 2012 06:30:38 GMT


Dawid Weiss commented on LUCENE-4321:

Yeah, this looks good to me! I'd even make "in" final, but maybe I'm paranoid and we shouldn't
limit the possibility of replacing it with something else, don't know.
// make this final?
+  protected Reader in;

I like it much better than subclassing FilterReader. I'm sure it will save many people debugging
time if they already have custom char filters.

+1 from me.
> considered harmful
> ---------------------------------------
>                 Key: LUCENE-4321
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Bug
>    Affects Versions: 4.0-BETA
>            Reporter: Robert Muir
>             Fix For: 5.0, 4.0
>         Attachments: LUCENE-4321.patch
> See Dawid's email:
> 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:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message