Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sleuthkit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IRT
Sleuthkit
Commits
0dd9b0cd
Unverified
Commit
0dd9b0cd
authored
5 years ago
by
Richard Cordovano
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #1658 from APriestman/5640_emptyParenBug
5640 Check that ID list is not empty
parents
e70e2aca
f94f66b4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bindings/java/src/org/sleuthkit/datamodel/TimelineManager.java
+13
-5
13 additions, 5 deletions
...ngs/java/src/org/sleuthkit/datamodel/TimelineManager.java
with
13 additions
and
5 deletions
bindings/java/src/org/sleuthkit/datamodel/TimelineManager.java
+
13
−
5
View file @
0dd9b0cd
...
@@ -805,6 +805,10 @@ public Set<Long> updateEventsForArtifactTagDeleted(BlackboardArtifact artifact)
...
@@ -805,6 +805,10 @@ public Set<Long> updateEventsForArtifactTagDeleted(BlackboardArtifact artifact)
}
}
private
void
updateEventSourceTaggedFlag
(
CaseDbConnection
conn
,
Collection
<
Long
>
eventDescriptionIDs
,
int
flagValue
)
throws
TskCoreException
{
private
void
updateEventSourceTaggedFlag
(
CaseDbConnection
conn
,
Collection
<
Long
>
eventDescriptionIDs
,
int
flagValue
)
throws
TskCoreException
{
if
(
eventDescriptionIDs
.
isEmpty
())
{
return
;
}
String
sql
=
"UPDATE tsk_event_descriptions SET tagged = "
+
flagValue
+
" WHERE event_description_id IN ("
+
buildCSVString
(
eventDescriptionIDs
)
+
")"
;
//NON-NLS
String
sql
=
"UPDATE tsk_event_descriptions SET tagged = "
+
flagValue
+
" WHERE event_description_id IN ("
+
buildCSVString
(
eventDescriptionIDs
)
+
")"
;
//NON-NLS
try
(
Statement
updateStatement
=
conn
.
createStatement
())
{
try
(
Statement
updateStatement
=
conn
.
createStatement
())
{
updateStatement
.
executeUpdate
(
sql
);
updateStatement
.
executeUpdate
(
sql
);
...
@@ -831,12 +835,16 @@ public Set<Long> updateEventsForHashSetHit(Content content) throws TskCoreExcept
...
@@ -831,12 +835,16 @@ public Set<Long> updateEventsForHashSetHit(Content content) throws TskCoreExcept
caseDB
.
acquireSingleUserCaseWriteLock
();
caseDB
.
acquireSingleUserCaseWriteLock
();
try
(
CaseDbConnection
con
=
caseDB
.
getConnection
();
Statement
updateStatement
=
con
.
createStatement
();)
{
try
(
CaseDbConnection
con
=
caseDB
.
getConnection
();
Statement
updateStatement
=
con
.
createStatement
();)
{
Map
<
Long
,
Long
>
eventIDs
=
getEventAndDescriptionIDs
(
con
,
content
.
getId
(),
true
);
Map
<
Long
,
Long
>
eventIDs
=
getEventAndDescriptionIDs
(
con
,
content
.
getId
(),
true
);
String
sql
=
"UPDATE tsk_event_descriptions SET hash_hit = 1"
+
" WHERE event_description_id IN ("
+
buildCSVString
(
eventIDs
.
values
())
+
")"
;
//NON-NLS
if
(!
eventIDs
.
isEmpty
())
{
try
{
String
sql
=
"UPDATE tsk_event_descriptions SET hash_hit = 1"
+
" WHERE event_description_id IN ("
+
buildCSVString
(
eventIDs
.
values
())
+
")"
;
//NON-NLS
updateStatement
.
executeUpdate
(
sql
);
//NON-NLS
try
{
updateStatement
.
executeUpdate
(
sql
);
//NON-NLS
return
eventIDs
.
keySet
();
}
catch
(
SQLException
ex
)
{
throw
new
TskCoreException
(
"Error setting hash_hit of events."
,
ex
);
//NON-NLS
}
}
else
{
return
eventIDs
.
keySet
();
return
eventIDs
.
keySet
();
}
catch
(
SQLException
ex
)
{
throw
new
TskCoreException
(
"Error setting hash_hit of events."
,
ex
);
//NON-NLS
}
}
}
catch
(
SQLException
ex
)
{
}
catch
(
SQLException
ex
)
{
throw
new
TskCoreException
(
"Error setting hash_hit of events."
,
ex
);
//NON-NLS
throw
new
TskCoreException
(
"Error setting hash_hit of events."
,
ex
);
//NON-NLS
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment