mirror of
https://github.com/elisspace/autopsy.git
synced 2026-10-01 23:09:56 +00:00
Cleanup
This commit is contained in:
@@ -48,8 +48,6 @@ public abstract class AbstractContentNode<T extends Content> extends ContentNode
|
||||
*/
|
||||
T content;
|
||||
private static final Logger logger = Logger.getLogger(AbstractContentNode.class.getName());
|
||||
private static int tempCountQueries = 0;
|
||||
private static int tempCountMapLookups = 0;
|
||||
|
||||
/**
|
||||
* Handles aspects that depend on the Content object
|
||||
@@ -114,10 +112,7 @@ public abstract class AbstractContentNode<T extends Content> extends ContentNode
|
||||
if (c != null) {
|
||||
|
||||
try {
|
||||
tempCountMapLookups++;
|
||||
if( ! c.hasChildren()) {
|
||||
//if( ! Case.getCurrentCaseThrows().getSleuthkitCase().getHasChildren(c.getId())) {
|
||||
//System.out.println("Map lookups: " + tempCountMapLookups + " queries: " + tempCountQueries);
|
||||
return false;
|
||||
}
|
||||
} catch (TskCoreException ex) {
|
||||
@@ -126,7 +121,6 @@ public abstract class AbstractContentNode<T extends Content> extends ContentNode
|
||||
return false;
|
||||
}
|
||||
|
||||
tempCountQueries++;
|
||||
String query = "SELECT COUNT(obj_id) AS count FROM "
|
||||
+ " ( SELECT obj_id FROM tsk_objects WHERE par_obj_id = " + c.getId() + " AND type = "
|
||||
+ TskData.ObjectType.ARTIFACT.getObjectType()
|
||||
@@ -139,7 +133,6 @@ public abstract class AbstractContentNode<T extends Content> extends ContentNode
|
||||
|
||||
try (SleuthkitCase.CaseDbQuery dbQuery = Case.getCurrentCaseThrows().getSleuthkitCase().executeQuery(query)) {
|
||||
ResultSet resultSet = dbQuery.getResultSet();
|
||||
//System.out.println("Map lookups: " + tempCountMapLookups + " queries: " + tempCountQueries);
|
||||
if(resultSet.next()){
|
||||
return (0 < resultSet.getInt("count"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user