7084 cancel when interupted exception thrown

This commit is contained in:
William Schaefer 2021-01-08 17:45:51 -05:00
parent e85d86ca41
commit 429e3bcb54
3 changed files with 3 additions and 3 deletions

View File

@ -61,6 +61,7 @@ class ArtifactsWorker extends SwingWorker<List<BlackboardArtifact>, Void> {
return domainSearch.getArtifacts(new DomainSearchArtifactsRequest(Case.getCurrentCase().getSleuthkitCase(), domain, artifactType));
} catch (DiscoveryException ex) {
if (ex.getCause() instanceof InterruptedException) {
this.cancel(true);
//ignore the exception as it was cancelled while the cache was performing its get and we support cancellation
} else {
throw ex;

View File

@ -347,7 +347,6 @@ public final class DiscoveryTopComponent extends TopComponent {
domainDetailsPanel.configureArtifactTabs(selectedDomainTabName);
detailsPanel = domainDetailsPanel;
} else {
FileDetailsPanel fileDetailsPanel = new FileDetailsPanel();
detailsPanel = new FileDetailsPanel();
}
rightSplitPane.setBottomComponent(detailsPanel);

View File

@ -57,10 +57,10 @@ class MiniTimelineWorker extends SwingWorker<List<MiniTimelineResult>, Void> {
DomainSearch domainSearch = new DomainSearch();
try {
results.addAll(domainSearch.getAllArtifactsForDomain(Case.getCurrentCase().getSleuthkitCase(), domain));
} catch (DiscoveryException ex) {
if (ex.getCause() instanceof InterruptedException) {
//ignore the exception as it was cancelled while the cache was performing its get and we support cancellation
this.cancel(true);
//ignore the exception as it was cancelled while the cache was performing its get and we support cancellation
} else {
throw ex;
}