mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-18 18:47:43 +00:00
Removed stack trace for lack of MD5.
This commit is contained in:
parent
6b442c8f36
commit
d7c93a4e8e
@ -235,21 +235,37 @@ public class EamArtifactUtil {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
CorrelationAttribute correlationAttribute = null;
|
CorrelationAttribute correlationAttribute;
|
||||||
|
CorrelationAttribute.Type type;
|
||||||
|
CorrelationCase correlationCase;
|
||||||
|
CorrelationDataSource correlationDataSource;
|
||||||
|
String value;
|
||||||
|
String filePath;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
CorrelationAttribute.Type type = EamDb.getInstance().getCorrelationTypeById(CorrelationAttribute.FILES_TYPE_ID);
|
type = EamDb.getInstance().getCorrelationTypeById(CorrelationAttribute.FILES_TYPE_ID);
|
||||||
CorrelationCase correlationCase = EamDb.getInstance().getCase(Case.getCurrentCaseThrows());
|
correlationCase = EamDb.getInstance().getCase(Case.getCurrentCaseThrows());
|
||||||
if (null == correlationCase) {
|
if (null == correlationCase) {
|
||||||
correlationCase = EamDb.getInstance().newCase(Case.getCurrentCaseThrows());
|
correlationCase = EamDb.getInstance().newCase(Case.getCurrentCaseThrows());
|
||||||
}
|
}
|
||||||
CorrelationDataSource correlationDataSource = CorrelationDataSource.fromTSKDataSource(correlationCase, file.getDataSource());
|
correlationDataSource = CorrelationDataSource.fromTSKDataSource(correlationCase, file.getDataSource());
|
||||||
String value = file.getMd5Hash();
|
value = file.getMd5Hash();
|
||||||
String filePath = (file.getParentPath() + file.getName()).toLowerCase();
|
filePath = (file.getParentPath() + file.getName()).toLowerCase();
|
||||||
|
} catch (TskCoreException | EamDbException ex) {
|
||||||
correlationAttribute = EamDb.getInstance().getCorrelationAttribute(type, correlationCase, correlationDataSource, value, filePath);
|
|
||||||
} catch (TskCoreException | EamDbException | NoCurrentCaseException ex) {
|
|
||||||
logger.log(Level.SEVERE, "Error retrieving correlation attribute.", ex);
|
logger.log(Level.SEVERE, "Error retrieving correlation attribute.", ex);
|
||||||
|
return null;
|
||||||
|
} catch (NoCurrentCaseException ex) {
|
||||||
|
logger.log(Level.SEVERE, "Case is closed.", ex);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
correlationAttribute = EamDb.getInstance().getCorrelationAttribute(type, correlationCase, correlationDataSource, value, filePath);
|
||||||
|
} catch (EamDbException ex) {
|
||||||
|
logger.log(Level.WARNING, String.format(
|
||||||
|
"Correlation attribute could not be retrieved for '%s' (id=%d): %s",
|
||||||
|
content.getName(), content.getId(), ex.getMessage()));
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return correlationAttribute;
|
return correlationAttribute;
|
||||||
@ -300,9 +316,12 @@ public class EamArtifactUtil {
|
|||||||
af.getParentPath() + af.getName());
|
af.getParentPath() + af.getName());
|
||||||
eamArtifact.addInstance(cei);
|
eamArtifact.addInstance(cei);
|
||||||
return eamArtifact;
|
return eamArtifact;
|
||||||
} catch (TskCoreException | EamDbException | NoCurrentCaseException ex) {
|
} catch (TskCoreException | EamDbException ex) {
|
||||||
logger.log(Level.SEVERE, "Error making correlation attribute.", ex);
|
logger.log(Level.SEVERE, "Error making correlation attribute.", ex);
|
||||||
return null;
|
return null;
|
||||||
|
} catch (NoCurrentCaseException ex) {
|
||||||
|
logger.log(Level.SEVERE, "Case is closed.", ex);
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user