lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Muir <>
Subject Re: Caveat when upgrading from 4.0.0-ALPHA to 4.0.0-BETA (CharStream overrides).
Date Tue, 21 Aug 2012 20:58:27 GMT
I think this is crazy, lets fix it so people don't trip up on this:

On Fri, Aug 17, 2012 at 4:15 PM, Dawid Weiss <> wrote:
> I've just hit this and I thought I'd share -- don't know if this was
> discussed. I had to update some code from 4.0.0-ALPHA to 4.0.0-BETA.
> We have custom subclasses of CharFilter.
> In ALPHA, CharFilter extends from (indirectly) Reader. In BETA, it
> inherits from FilteredReader. The (surprising?) difference is that for
> alpha it was enough to override reader's only abstract method, namely:
> abstract public int read(char cbuf[], int off, int len) throws IOException;
> because all the other methods redirect to this one (this isn't a
> contract but they do). When one switches to beta and makes all the
> tiny code tweaks the code stops working correctly because all the
> read() methods from FilterReaderdelegate directly to the wrapped
> reader and not to FilterReader's read(char[],int,int).
> It could be corrected by overriding those methods in CharFilter... but
> then, maybe it would be enough to put a big red javadoc warning from
> those who are upgrading (like me)?
> Dawid
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:


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

View raw message