Suppose you have multiple NatTable instances that include the "Excel-like" filter row with caching enabled. Open a filter combo of one column, so the contents get loaded and the cache is for that column is set. Now close the other instance and replace the content of the NatTable instance for which the cache was populated before. The content change should trigger an update of the cache (technically a clear so it gets re-calculated). But nothing happens and you still see the filter combobox content of the previous table content.
The reason is in GlazedListsFilterRowComboBoxDataProvider#dispose(). There the static SCHEDULER is immediately shutdown, without checking if other instances are available. The Scheduler class should avoid this, but the direct call to shutdownNow() avoids the check.
I also noticed that in some scenarios (e.g. lazy loading is disabled and caching enabled) events are fired from a background thread. If a listener is added to the NatTable, that tries to update the UI, but the event is fired from the background thread, the Future gets an Exception and is killed. But that happens silently, and there is no indication that the Future is killed and what Exception caused this.
Suppose you have multiple NatTable instances that include the "Excel-like" filter row with caching enabled. Open a filter combo of one column, so the contents get loaded and the cache is for that column is set. Now close the other instance and replace the content of the NatTable instance for which the cache was populated before. The content change should trigger an update of the cache (technically a clear so it gets re-calculated). But nothing happens and you still see the filter combobox content of the previous table content.
The reason is in
GlazedListsFilterRowComboBoxDataProvider#dispose()
. There the static SCHEDULER is immediately shutdown, without checking if other instances are available. TheScheduler
class should avoid this, but the direct call toshutdownNow()
avoids the check.I also noticed that in some scenarios (e.g. lazy loading is disabled and caching enabled) events are fired from a background thread. If a listener is added to the NatTable, that tries to update the UI, but the event is fired from the background thread, the
Future
gets anException
and is killed. But that happens silently, and there is no indication that theFuture
is killed and whatException
caused this.