lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shad Storhaug (Jira)" <>
Subject [jira] [Commented] (LUCENENET-611) TokenStream.IncrementToken() is called after Dispose() is called
Date Thu, 09 Apr 2020 21:17:00 GMT


Shad Storhaug commented on LUCENENET-611:

It is possible that this issue was due to a bug in {{Lucene.Net.TestFramework}} that has
been addressed already. We need to confirm that it was the test framework that was errantly
causing the double-call, not a feature of Lucene.NET.

Also, the {{ICUCollationKeyFilter}} no longer implements {{Dispose()}} - that was when we
were referencing icu-dotnet (which had unmanaged resources) instead of ICU4N. However, the
behavior can be observed in any existing disposable {{TokenStream}} or by overriding {{Dispose(bool)}}
in one that isn't disposable.

> TokenStream.IncrementToken() is called after Dispose() is called
> ----------------------------------------------------------------
>                 Key: LUCENENET-611
>                 URL:
>             Project: Lucene.Net
>          Issue Type: Bug
>          Components: Lucene.Net Core
>    Affects Versions: Lucene.Net 4.8.0
>            Reporter: Shad Storhaug
>            Priority: Minor
> When overriding {{Dispose(bool)}} in either {{TokenStream}} subclasses, Lucene.Net
will call {{Dispose()}} before it is done using the {{TokenStream}}, and call {{IncrementToken()}}
> The behavior can be observed in the {{Lucene.Net.Collation.TestICUCollationKeyFilter.TestCollationKeySort()}}
when the {{ICUCollationKeyFilter}} implements {{Dispose()}}.

This message was sent by Atlassian Jira

View raw message