mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 18:17:43 +00:00
Fixed exception create cc bin nodes
This commit is contained in:
parent
882248b43e
commit
ad8d4e7a9d
@ -1481,7 +1481,7 @@ final public class Accounts implements AutopsyVisitableItem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final private class CreditCardNumberFactory extends ObservingChildren<Long> {
|
final private class CreditCardNumberFactory extends ObservingChildren<DataArtifact> {
|
||||||
|
|
||||||
private final BinResult bin;
|
private final BinResult bin;
|
||||||
|
|
||||||
@ -1502,10 +1502,10 @@ final public class Accounts implements AutopsyVisitableItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean createKeys(List<Long> list) {
|
protected boolean createKeys(List<DataArtifact> list) {
|
||||||
|
|
||||||
String query
|
String query
|
||||||
= "SELECT blackboard_artifacts.artifact_id " //NON-NLS
|
= "SELECT blackboard_artifacts.artifact_obj_id " //NON-NLS
|
||||||
+ " FROM blackboard_artifacts " //NON-NLS
|
+ " FROM blackboard_artifacts " //NON-NLS
|
||||||
+ " JOIN blackboard_attributes ON blackboard_artifacts.artifact_id = blackboard_attributes.artifact_id " //NON-NLS
|
+ " JOIN blackboard_attributes ON blackboard_artifacts.artifact_id = blackboard_attributes.artifact_id " //NON-NLS
|
||||||
+ " WHERE blackboard_artifacts.artifact_type_id = " + BlackboardArtifact.Type.TSK_ACCOUNT.getTypeID() //NON-NLS
|
+ " WHERE blackboard_artifacts.artifact_type_id = " + BlackboardArtifact.Type.TSK_ACCOUNT.getTypeID() //NON-NLS
|
||||||
@ -1517,7 +1517,7 @@ final public class Accounts implements AutopsyVisitableItem {
|
|||||||
try (SleuthkitCase.CaseDbQuery results = skCase.executeQuery(query);
|
try (SleuthkitCase.CaseDbQuery results = skCase.executeQuery(query);
|
||||||
ResultSet rs = results.getResultSet();) {
|
ResultSet rs = results.getResultSet();) {
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
list.add(rs.getLong("artifact_id")); //NON-NLS
|
list.add(skCase.getBlackboard().getDataArtifactById(rs.getLong("artifact_obj_id"))); //NON-NLS
|
||||||
}
|
}
|
||||||
} catch (TskCoreException | SQLException ex) {
|
} catch (TskCoreException | SQLException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "Error querying for account artifacts.", ex); //NON-NLS
|
LOGGER.log(Level.SEVERE, "Error querying for account artifacts.", ex); //NON-NLS
|
||||||
@ -1527,18 +1527,8 @@ final public class Accounts implements AutopsyVisitableItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Node[] createNodesForKey(Long artifactID) {
|
protected Node[] createNodesForKey(DataArtifact artifact) {
|
||||||
if (skCase == null) {
|
return new Node[]{new AccountArtifactNode(artifact)};
|
||||||
return new Node[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
DataArtifact art = skCase.getBlackboard().getDataArtifactById(artifactID);
|
|
||||||
return new Node[]{new AccountArtifactNode(art)};
|
|
||||||
} catch (TskCoreException ex) {
|
|
||||||
LOGGER.log(Level.SEVERE, "Error creating BlackboardArtifactNode for artifact with ID " + artifactID, ex); //NON-NLS
|
|
||||||
return new Node[0];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user