Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Autopsy
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
Autopsy
Commits
d0ec4dd6
Commit
d0ec4dd6
authored
4 years ago
by
apriestman
Committed by
rcordovano
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Create timeline controller only at case open
parent
b55a3882
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
Core/src/org/sleuthkit/autopsy/timeline/TimeLineModule.java
+17
-11
17 additions, 11 deletions
Core/src/org/sleuthkit/autopsy/timeline/TimeLineModule.java
with
17 additions
and
11 deletions
Core/src/org/sleuthkit/autopsy/timeline/TimeLineModule.java
+
17
−
11
View file @
d0ec4dd6
...
@@ -49,19 +49,19 @@ private TimeLineModule() {
...
@@ -49,19 +49,19 @@ private TimeLineModule() {
}
}
/**
/**
* Get instance of the controller for the current case
* Get instance of the controller for the current case.
* The controller instance is initialized from a case open event.
*
*
* @return the controller for the current case.
* @return the controller for the current case.
*
*
* @throws NoCurrentCaseException If there is no case open.
* @throws TskCoreException If there was a problem accessing the case
* @throws TskCoreException If there was a problem accessing the case
* database.
* database.
*
*
*/
*/
public
static
TimeLineController
getController
()
throws
NoCurrentCaseException
,
TskCoreException
{
public
static
TimeLineController
getController
()
throws
TskCoreException
{
synchronized
(
controllerLock
)
{
synchronized
(
controllerLock
)
{
if
(
controller
==
null
)
{
if
(
controller
==
null
)
{
controller
=
new
Time
L
ine
C
ontroller
(
Case
.
getCurrentCaseThrows
()
);
throw
new
TskCoreException
(
"
Time
l
ine
c
ontroller
not initialized"
);
}
}
return
controller
;
return
controller
;
}
}
...
@@ -100,13 +100,22 @@ public void propertyChange(PropertyChangeEvent evt) {
...
@@ -100,13 +100,22 @@ public void propertyChange(PropertyChangeEvent evt) {
}
}
controller
=
null
;
controller
=
null
;
}
}
}
else
{
// Case is opening - create the controller now
synchronized
(
controllerLock
)
{
try
{
controller
=
new
TimeLineController
(
Case
.
getCurrentCaseThrows
());
}
catch
(
TskCoreException
|
NoCurrentCaseException
ex
)
{
logger
.
log
(
Level
.
SEVERE
,
"Error creating Timeline controller"
,
ex
);
}
}
}
}
}
else
{
}
else
{
try
{
try
{
getController
().
handleCaseEvent
(
evt
);
getController
().
handleCaseEvent
(
evt
);
}
catch
(
NoCurrentCaseException
ignored
)
{
}
catch
(
TskCoreException
ex
)
{
}
catch
(
TskCoreException
ex
)
{
logger
.
log
(
Level
.
SEVERE
,
"Error handling application event"
,
ex
);
// The call to getController() will only fail due to case closing, so do
// not record the error.
}
}
}
}
}
}
...
@@ -121,12 +130,9 @@ static private class IngestModuleEventListener implements PropertyChangeListener
...
@@ -121,12 +130,9 @@ static private class IngestModuleEventListener implements PropertyChangeListener
public
void
propertyChange
(
PropertyChangeEvent
evt
)
{
public
void
propertyChange
(
PropertyChangeEvent
evt
)
{
try
{
try
{
getController
().
handleIngestModuleEvent
(
evt
);
getController
().
handleIngestModuleEvent
(
evt
);
}
catch
(
NoCurrentCaseException
ex
)
{
// ignore
return
;
}
catch
(
TskCoreException
ex
)
{
}
catch
(
TskCoreException
ex
)
{
MessageNotifyUtil
.
Message
.
error
(
"Error creating timeline controller."
);
// The call to getController() will only fail due to case closing, so do
logger
.
log
(
Level
.
SEVERE
,
"Error creating timeline controller"
,
ex
);
// not record the error.
}
}
}
}
}
}
...
...
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