lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <>
Subject [jira] Commented: (LUCENE-1636) TokenFilters with a null value in the constructor fail
Date Fri, 22 May 2009 10:48:46 GMT


Uwe Schindler commented on LUCENE-1636:

Thanks, I am still in Japan and had no time to check this out myself. So it seems good. I
would suggest to add this to changes.txt with a warning about the change in backwards compatibility.
The issue itsself should be closed as wont-fix, as the usage of Filters with a null delegate
is not specified in API and is not correct.
The case, Wouter explained, is just a workaround for incorrect usage of filters. He wants
to reuse some methods of the filter somewhere else and wants to construct a "dummy" instance
for that. He should not do this and better move the code accessible outside of the TokenFilter
to a separate class.
Maybe we should add a special ==null test to the constructor, that early throws a NPE with
a short notice, that this usage is no longer supported.

> TokenFilters with a null value in the constructor fail
> ------------------------------------------------------
>                 Key: LUCENE-1636
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 2.9
>            Reporter: Wouter Heijke
>            Assignee: Michael McCandless
>             Fix For: 2.9
>         Attachments: LUCENE-1636.patch
> While migrating from 2.4.x to 2.9-dev I found a lot of failing unittests.
> One problem is with TokenFilters that do a super(null) in the constructor.
> I fixed it by changing the constructor to super(new EmptyTokenStream())
> This will cause problems and frustration to others while migrating to 2.9.

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

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

View raw message