Call getUniquePath in constructor

This commit is contained in:
U-BASIS\dsmyda 2020-01-16 17:52:45 -05:00
parent 569ab1e3c3
commit e8dc79d815
2 changed files with 20 additions and 0 deletions

View File

@ -94,6 +94,16 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
IngestManager.getInstance().addIngestModuleEventListener(INGEST_MODULE_EVENTS_OF_INTEREST, weakPcl);
}
}
try {
//See JIRA-5971
//Attempt to cache file path during construction of this UI component.
this.content.getUniquePath();
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, String.format("Failed attempt to cache the "
+ "unique path of the abstract file instance. Name: %s (objID=%d)",
this.content.getName(), this.content.getId()), ex);
}
if (UserPreferences.displayTranslatedFileNames()) {
backgroundTasksPool.submit(new TranslationTask(

View File

@ -194,6 +194,16 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
for (Content lookupContent : this.getLookup().lookupAll(Content.class)) {
if ((lookupContent != null) && (!(lookupContent instanceof BlackboardArtifact))) {
this.associated = lookupContent;
try {
//See JIRA-5971
//Attempt to cache file path during construction of this UI component.
this.associated.getUniquePath();
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, String.format("Failed attempt to cache the "
+ "unique path of the associated content instance. Name: %s (objID=%d)",
this.associated.getName(), this.associated.getId()), ex);
}
break;
}
}