Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
9.0
-
None
-
None
-
New
Description
When we close a DirectoryTaxonomyReader in doClose, we set the categoryCache to null. But if a thread is next after this doClose call, it will still try to acquire a lock and synchronize on it. This will result in an NPE.
This works well today, because we operate on the assumption that the user will always call doClose after all threads have completed.
One suggestion by mikemccand in this PR was to make categoryCache final and throw an AlreadyClosedException.