diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/ExtractedContent.java b/Core/src/org/sleuthkit/autopsy/datamodel/ExtractedContent.java index d14a1fc912..4dd61aa643 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/ExtractedContent.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/ExtractedContent.java @@ -213,9 +213,14 @@ public class ExtractedContent implements AutopsyVisitableItem { @Override protected boolean createKeys(List list) { + //TEST COMMENT if (skCase != null) { try { - List inUse = skCase.getBlackboardArtifactTypesInUse(); + List inUse = new ArrayList<>(); + List types = skCase.getArtifactTypesInUse(); + for (Integer i: types) { + inUse.add(BlackboardArtifact.ARTIFACT_TYPE.fromID(i)); + } inUse.removeAll(doNotShow); Collections.sort(inUse, new Comparator() { diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeDetector.java b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeDetector.java index a0da674723..dfc92ef0de 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeDetector.java +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeDetector.java @@ -45,7 +45,6 @@ public class FileTypeDetector { private static final int BUFFER_SIZE = 64 * 1024; private final byte buffer[] = new byte[BUFFER_SIZE]; private final List userDefinedFileTypes; - private static Blackboard blackboard; private static final Logger logger = Logger.getLogger(FileTypeDetector.class.getName()); /** @@ -174,7 +173,6 @@ public class FileTypeDetector { * @throws TskCoreException */ public String detect(AbstractFile file) throws TskCoreException { - blackboard = Case.getCurrentCase().getServices().getBlackboard(); // consistently mark non-regular files (refer TskData.TSK_FS_META_TYPE_ENUM), // 0 sized files, unallocated, and unused blocks (refer TskData.TSK_DB_FILES_TYPE_ENUM) // as octet-stream. @@ -247,9 +245,13 @@ public class FileTypeDetector { try { // index the artifact for keyword search - blackboard.indexArtifact(artifact); + Case.getCurrentCase().getServices().getBlackboard().indexArtifact(artifact); } catch (Blackboard.BlackboardException ex) { - logger.log(Level.SEVERE, NbBundle.getMessage(Blackboard.class, "Blackboard.unableToIndexArtifact.error.msg", artifact.getDisplayName()), ex); //NON-NLS + logger.log(Level.SEVERE, String.format("Unable to index blackboard artifact %d", artifact.getArtifactID()), ex); //NON-NLS + MessageNotifyUtil.Notify.error( + NbBundle.getMessage(Blackboard.class, "Blackboard.unableToIndexArtifact.exception.msg"), artifact.getDisplayName()); + } catch (IllegalStateException ex) { + logger.log(Level.SEVERE, String.format("Unable to index blackboard artifact %d", artifact.getArtifactID()), ex); MessageNotifyUtil.Notify.error( NbBundle.getMessage(Blackboard.class, "Blackboard.unableToIndexArtifact.exception.msg"), artifact.getDisplayName()); }