This commit is contained in:
Ann Priestman
2018-06-08 11:31:02 -04:00
parent a2c998479e
commit 38f34d7b0a
@@ -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"));
}