mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-15 09:17:42 +00:00
Declared reference to IntervalErrorReportData as volatile
This commit is contained in:
parent
41fb08aef6
commit
99948bb677
@ -253,13 +253,12 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
|||||||
private final XMLCaseManagement xmlcm;
|
private final XMLCaseManagement xmlcm;
|
||||||
private final SleuthkitCase db;
|
private final SleuthkitCase db;
|
||||||
// Track the current case (only set with changeCase() method)
|
// Track the current case (only set with changeCase() method)
|
||||||
volatile private static Case currentCase = null;
|
private static Case currentCase = null;
|
||||||
private final CaseType caseType;
|
private final CaseType caseType;
|
||||||
private final Services services;
|
private final Services services;
|
||||||
private static final Logger logger = Logger.getLogger(Case.class.getName());
|
private static final Logger logger = Logger.getLogger(Case.class.getName());
|
||||||
static final String CASE_EXTENSION = "aut"; //NON-NLS
|
static final String CASE_EXTENSION = "aut"; //NON-NLS
|
||||||
static final String CASE_DOT_EXTENSION = "." + CASE_EXTENSION;
|
static final String CASE_DOT_EXTENSION = "." + CASE_EXTENSION;
|
||||||
private static String HostName;
|
|
||||||
private final static String CACHE_FOLDER = "Cache"; //NON-NLS
|
private final static String CACHE_FOLDER = "Cache"; //NON-NLS
|
||||||
private final static String EXPORT_FOLDER = "Export"; //NON-NLS
|
private final static String EXPORT_FOLDER = "Export"; //NON-NLS
|
||||||
private final static String LOG_FOLDER = "Log"; //NON-NLS
|
private final static String LOG_FOLDER = "Log"; //NON-NLS
|
||||||
@ -374,12 +373,12 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void receiveError(String context, String errorMessage) {
|
public void receiveError(String context, String errorMessage) {
|
||||||
/* NOTE: We are accessing currentCase.tskErrorReporter from two different threads.
|
/* NOTE: We are accessing tskErrorReporter from two different threads.
|
||||||
* This is ok as long as we only read the value of currentCase.tskErrorReporter
|
* This is ok as long as we only read the value of tskErrorReporter
|
||||||
* because both currentCase and tskErrorReporter are declared as volatile.
|
* because tskErrorReporter is declared as volatile.
|
||||||
*/
|
*/
|
||||||
if (null != currentCase && null != currentCase.tskErrorReporter) {
|
if (null != tskErrorReporter) {
|
||||||
currentCase.tskErrorReporter.addProblems(context, errorMessage);
|
tskErrorReporter.addProblems(context, errorMessage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user