bongohrtech / lucenenet

Mirror of Apache Lucene.Net
Apache License 2.0
0 stars 0 forks source link

API: Review to ensure IDisposable is being used correctly and disposable pattern implemented correctly #123

Open bongohrtech opened 4 years ago

bongohrtech commented 4 years ago

There have been several issues found recently with the disposable pattern not being implemented correctly. I have also been made aware that there is at least one class (Lucene.Net.Store.Lock, if I recall correctly) that is designed to be re-opened after it is closed.

We need a review to ensure all classes that implement disposable are doing it correctly and have correctly implemented the dispose pattern both for sealed and unsealed types. We also need to have a close look at whether any classes should be reverted back to using Close() instead of Dispose() on account that the class instance was designed to be used again after the Dispose() call.

JIRA link - [LUCENENET-626] created by nightowl888

bongohrtech commented 4 years ago

It is believed that IncrementToken() was being called after Dispose() because of a bug in the test framework that has been addressed. We need verification that this issue is no longer happening.

by nightowl888