mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Refactorred Octer Occurrences viewer
This commit is contained in:
parent
b5a41484d5
commit
c45e6e9e46
@ -87,27 +87,10 @@ public final class OtherOccurrences {
|
|||||||
|
|
||||||
if (osAccountAddr.isPresent()) {
|
if (osAccountAddr.isPresent()) {
|
||||||
try {
|
try {
|
||||||
for (OsAccountInstance instance : osAccount.getOsAccountInstances()) {
|
for (OsAccountInstance instance : osAccount.getOsAccountInstances()) {
|
||||||
DataSource osAccountDataSource = instance.getDataSource();
|
CorrelationAttributeInstance correlationAttributeInstance = CorrelationAttributeUtil.makeCorrAttr(instance.getOsAccount(), instance.getDataSource());
|
||||||
try {
|
if (correlationAttributeInstance != null) {
|
||||||
CorrelationCase correlationCase = CentralRepository.getInstance().getCase(Case.getCurrentCaseThrows());
|
|
||||||
CorrelationAttributeInstance correlationAttributeInstance = new CorrelationAttributeInstance(
|
|
||||||
CentralRepository.getInstance().getCorrelationTypeById(CorrelationAttributeInstance.OSACCOUNT_TYPE_ID),
|
|
||||||
osAccountAddr.get(),
|
|
||||||
correlationCase,
|
|
||||||
CorrelationDataSource.fromTSKDataSource(correlationCase, instance.getDataSource()),
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
TskData.FileKnown.KNOWN,
|
|
||||||
osAccount.getId());
|
|
||||||
|
|
||||||
ret.add(correlationAttributeInstance);
|
ret.add(correlationAttributeInstance);
|
||||||
} catch (CentralRepoException ex) {
|
|
||||||
logger.log(Level.SEVERE, String.format("Cannot get central repository for OsAccount: %s.", osAccountAddr.get()), ex); //NON-NLS
|
|
||||||
} catch (NoCurrentCaseException ex) {
|
|
||||||
logger.log(Level.WARNING, String.format("Exception while getting open case looking up osAccount %s.", osAccountAddr.get()), ex); //NON-NLS
|
|
||||||
} catch (CorrelationAttributeNormalizationException ex) {
|
|
||||||
logger.log(Level.SEVERE, String.format("Exception with Correlation Attribute Normalization for osAccount %s.", osAccountAddr.get()), ex); //NON-NLS
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user