mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-15 01:07:42 +00:00
6774 attempt to address codacy issues
This commit is contained in:
parent
3d77c8d1eb
commit
71696390a0
@ -228,18 +228,20 @@ class ArtifactsListPanel extends JPanel {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
for (BlackboardAttribute bba : getArtifactByRow(rowIndex).getAttributes()) {
|
for (BlackboardAttribute bba : getArtifactByRow(rowIndex).getAttributes()) {
|
||||||
if (columnIndex == 0 && bba.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.getTypeID() && !StringUtils.isBlank(bba.getDisplayString())) {
|
if (!StringUtils.isBlank(bba.getDisplayString())) {
|
||||||
return bba.getDisplayString();
|
if (columnIndex == 0 && bba.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.getTypeID()) {
|
||||||
} else if (columnIndex == 1) {
|
|
||||||
if (bba.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TITLE.getTypeID() && artifactType != BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_DOWNLOAD && !StringUtils.isBlank(bba.getDisplayString())) {
|
|
||||||
return bba.getDisplayString();
|
return bba.getDisplayString();
|
||||||
} else if (artifactType == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_CACHE && bba.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PATH_ID.getTypeID() && !StringUtils.isBlank(bba.getDisplayString())) {
|
} else if (columnIndex == 1) {
|
||||||
return Case.getCurrentCase().getSleuthkitCase().getAbstractFileById(bba.getValueLong()).getName();
|
if (bba.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TITLE.getTypeID() && artifactType != BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_DOWNLOAD) {
|
||||||
} else if (bba.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PATH.getTypeID() && artifactType == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_DOWNLOAD) {
|
return bba.getDisplayString();
|
||||||
return FilenameUtils.getName(bba.getDisplayString());
|
} else if (artifactType == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_CACHE && bba.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PATH_ID.getTypeID()) {
|
||||||
|
return Case.getCurrentCase().getSleuthkitCase().getAbstractFileById(bba.getValueLong()).getName();
|
||||||
|
} else if (bba.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PATH.getTypeID() && artifactType == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_DOWNLOAD) {
|
||||||
|
return FilenameUtils.getName(bba.getDisplayString());
|
||||||
|
}
|
||||||
|
} else if (columnIndex == 2 && artifactType == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_CACHE && bba.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PATH_ID.getTypeID()) {
|
||||||
|
return Case.getCurrentCase().getSleuthkitCase().getAbstractFileById(bba.getValueLong()).getMIMEType();
|
||||||
}
|
}
|
||||||
} else if (columnIndex == 2 && artifactType == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_CACHE && bba.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PATH_ID.getTypeID() && !StringUtils.isBlank(bba.getDisplayString())) {
|
|
||||||
return Case.getCurrentCase().getSleuthkitCase().getAbstractFileById(bba.getValueLong()).getMIMEType();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return getFallbackValue(rowIndex, columnIndex);
|
return getFallbackValue(rowIndex, columnIndex);
|
||||||
|
@ -50,6 +50,8 @@ final class DomainDetailsPanel extends JPanel {
|
|||||||
DomainDetailsPanel(ARTIFACT_TYPE initialSelectedTab) {
|
DomainDetailsPanel(ARTIFACT_TYPE initialSelectedTab) {
|
||||||
if (initialSelectedTab != null) {
|
if (initialSelectedTab != null) {
|
||||||
selectedTabName = initialSelectedTab.getDisplayName();
|
selectedTabName = initialSelectedTab.getDisplayName();
|
||||||
|
} else {
|
||||||
|
selectedTabName = null;
|
||||||
}
|
}
|
||||||
initComponents();
|
initComponents();
|
||||||
addArtifactTabs();
|
addArtifactTabs();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user