mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-21 15:54:39 +01:00
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.
This commit is contained in:
parent
0e4c900252
commit
149aa529e7
@ -50,6 +50,9 @@ public class PreferencesData {
|
||||
//ignore
|
||||
}
|
||||
|
||||
// Start with a clean slate
|
||||
prefs = new PreferencesMap();
|
||||
|
||||
// start by loading the defaults, in case something
|
||||
// important was deleted from the user prefs
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user