Skip to content

Commit 149aa52

Browse files
matthijskooijmancmaglie
authored andcommitted
PreferencesData: Recreate PreferencesMap in init
Normally, init is only called once during startup, so this does not add anything. However, when running the testsuite, PreferencesData could be initialized multiple times in a single test run. To prevent preferences from a previous test from interfering with subsequent tests, always start with a clean slate when calling init.
1 parent 0e4c900 commit 149aa52

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arduino-core/src/processing/app/PreferencesData.java

+3
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ static public void init(File file) throws Exception {
5050
//ignore
5151
}
5252

53+
// Start with a clean slate
54+
prefs = new PreferencesMap();
55+
5356
// start by loading the defaults, in case something
5457
// important was deleted from the user prefs
5558
try {

0 commit comments

Comments
 (0)