lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <>
Subject [jira] [Created] (LUCENE-3089) CachingTokenFilter can cause close() to be called twice.
Date Thu, 12 May 2011 13:49:47 GMT
CachingTokenFilter can cause close() to be called twice.

                 Key: LUCENE-3089
             Project: Lucene - Java
          Issue Type: Bug
            Reporter: Robert Muir

In LUCENE-3064, we added some state and checks to MockTokenizer to validate that consumers
are properly using the tokenstream workflow (described here:

One problem I noticed in TestTermVectorsWriter.testEndOffsetPositionWithCachingTokenFilter
is that providing a CachingTOkenFilter directly will result
in close() being called twice on the underlying tokenstream... this seems wrong.

Some ideas to fix this could be:
# CachingTokenFilter overrides close() and we document that you must close the underlying
stream yourself. I think this is what the queryparser does anyway.
# CachingTokenFilter does something tricky to ensure it only closes the underlying stream

This message is automatically generated by JIRA.
For more information on JIRA, see:

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

View raw message