7918 change is supported method

This commit is contained in:
William Schaefer 2021-09-10 19:08:42 -04:00
parent 25612ae6da
commit 933dbdefe9

View File

@ -90,19 +90,13 @@ public final class DataContentViewerOtherCases extends JPanel implements DataCon
@Override @Override
public boolean isSupported(Node node) { public boolean isSupported(Node node) {
// Is supported if one of the following is true: // Is supported if:
// - The central repo is enabled and the node is not null // The central repo is enabled and the node is not null
// - The central repo is disabled and the backing file has a valid MD5 hash
// And the node has information which could be correlated on. // And the node has information which could be correlated on.
if (CentralRepository.isEnabled() && node != null) { return CentralRepository.isEnabled() && node != null
return OtherOccurrences.getAbstractFileFromNode(node) != null || OtherOccurrences.getBlackboardArtifactFromNode(node) != null || node.getLookup().lookup(OsAccount.class) != null; && (OtherOccurrences.getAbstractFileFromNode(node) != null
} else if (node != null) { || OtherOccurrences.getBlackboardArtifactFromNode(node) != null
AbstractFile file = OtherOccurrences.getAbstractFileFromNode(node); || node.getLookup().lookup(OsAccount.class) != null);
return file != null
&& file.getSize() > 0
&& ((file.getMd5Hash() != null) && (!file.getMd5Hash().isEmpty()));
}
return false;
} }
@Override @Override