Merge pull request #5991 from gdicristofaro/6485-TimelineControllerIssue

6485 TimelineController handling events after the case is closed
This commit is contained in:
Richard Cordovano 2020-07-08 15:28:19 -04:00 committed by GitHub
commit d67c0e3b50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 4 deletions

View File

@ -73,6 +73,7 @@ import org.sleuthkit.autopsy.coreutils.History;
import org.sleuthkit.autopsy.coreutils.LoggedTask;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.coreutils.ThreadConfined;
import org.sleuthkit.autopsy.coreutils.ThreadUtils;
import org.sleuthkit.autopsy.events.AutopsyEvent;
import org.sleuthkit.autopsy.ingest.IngestManager;
import org.sleuthkit.autopsy.ingest.ModuleDataEvent;
@ -375,17 +376,26 @@ public class TimeLineController {
}
}
/**
* "Shut down" Timeline. Remove all the case and ingest listers. Close the
* timeline window.
* Shuts down the task executor in charge of handling case events.
*/
void shutDownTimeLineListeners() {
ThreadUtils.shutDownTaskExecutor(executor);
}
/**
* "Shut down" Timeline. Close the timeline window.
*/
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
public void shutDownTimeLine() {
public void shutDownTimeLineGui() {
if (topComponent != null) {
topComponent.close();
topComponent = null;
}
}
/**
* Add the case and ingest listeners, prompt for rebuilding the database if

View File

@ -95,7 +95,8 @@ public class TimeLineModule {
*/
synchronized (controllerLock) {
if (controller != null) {
SwingUtilities.invokeLater(controller::shutDownTimeLine);
controller.shutDownTimeLineListeners();
SwingUtilities.invokeLater(controller::shutDownTimeLineGui);
}
controller = null;
}