[
https://issues.apache.org/jira/browse/LUCENENET-611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17080006#comment-17080006
]
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: https://issues.apache.org/jira/browse/LUCENENET-611
> 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()}} again.
>
> The behavior can be observed in the
> {{Lucene.Net.Collation.TestICUCollationKeyFilter.TestCollationKeySort()}}
> when the {{ICUCollationKeyFilter}} implements {{Dispose()}}.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)