mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Fixed the NPE experienced when searching for certain keywords on the Cambridge cluster
This commit is contained in:
parent
7297678f30
commit
7644693f12
@ -8,7 +8,7 @@ MultiCaseKeywordSearchPanel.exactRadioButton.text_1=Exact Match
|
||||
MultiCaseKeywordSearchPanel.substringRadioButton.text_1=Substring Match
|
||||
MultiCaseKeywordSearchPanel.regexRadioButton.text_1=Regular Expression
|
||||
MultiCaseKeywordSearchPanel.keywordTextField.text_1=
|
||||
MultiCaseKeywordSearchPanel.toolDescriptionTextArea.text=Perform a keyword search on the selected collections to find cases which contain hits. The cases can be opened to examine the results more closely.
|
||||
MultiCaseKeywordSearchPanel.toolDescriptionTextArea.text=Perform a keyword search on the selected cases. The case can be opened to examine the results more closely.
|
||||
MultiCaseKeywordSearchPanel.casesLabel.text_1=Cases
|
||||
MultiCaseKeywordSearchPanel.resultsLabel.text=Results
|
||||
MultiCaseKeywordSearchPanel.uncheckButton.text=Uncheck All
|
||||
|
@ -89,7 +89,7 @@ MultiCaseKeywordSearchPanel.exactRadioButton.text_1=Exact Match
|
||||
MultiCaseKeywordSearchPanel.substringRadioButton.text_1=Substring Match
|
||||
MultiCaseKeywordSearchPanel.regexRadioButton.text_1=Regular Expression
|
||||
MultiCaseKeywordSearchPanel.keywordTextField.text_1=
|
||||
MultiCaseKeywordSearchPanel.toolDescriptionTextArea.text=Perform a keyword search on the selected collections to find cases which contain hits. The cases can be opened to examine the results more closely.
|
||||
MultiCaseKeywordSearchPanel.toolDescriptionTextArea.text=Perform a keyword search on the selected cases. The case can be opened to examine the results more closely.
|
||||
MultiCaseKeywordSearchPanel.casesLabel.text_1=Cases
|
||||
MultiCaseKeywordSearchPanel.resultsLabel.text=Results
|
||||
MultiCaseKeywordSearchPanel.uncheckButton.text=Uncheck All
|
||||
|
@ -71,6 +71,7 @@ import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import org.sleuthkit.datamodel.CaseDbConnectionInfo;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
import org.sleuthkit.datamodel.Report;
|
||||
import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
import org.w3c.dom.Document;
|
||||
@ -534,7 +535,7 @@ final class MultiCaseSearcher {
|
||||
final String caseDirectoryPath = caseMetadata.getCaseDirectory();
|
||||
final Content content = caseDatabase.getContentById(objectId);
|
||||
final Content dataSource = content.getDataSource();
|
||||
final String dataSourceName = dataSource.getName();
|
||||
final String dataSourceName = (dataSource == null) ? "" : dataSource.getName();
|
||||
SearchHit.SourceType sourceType = SearchHit.SourceType.FILE;
|
||||
String sourceName = "";
|
||||
String sourcePath = "";
|
||||
@ -564,7 +565,13 @@ final class MultiCaseSearcher {
|
||||
} else {
|
||||
sourcePath = source.getUniquePath();
|
||||
}
|
||||
} else if (content instanceof Report) {
|
||||
Report report = (Report) content;
|
||||
sourceType = SearchHit.SourceType.REPORT;
|
||||
sourceName = report.getReportName();
|
||||
sourcePath = report.getUniquePath();
|
||||
}
|
||||
|
||||
return new SearchHit(caseDisplayName, caseDirectoryPath, dataSourceName, sourceType, sourceName, sourcePath);
|
||||
} catch (SQLException | TskCoreException ex) {
|
||||
throw new MultiCaseSearcherException(Bundle.MultiCaseSearcher_exceptionMessage_hitProcessingError(solrObjectId, caseInfo.getCaseMetadata().getCaseName(), caseInfo.getCaseMetadata().getCaseDirectory()), ex);
|
||||
|
Loading…
x
Reference in New Issue
Block a user