Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/arduino/Arduino.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthijs Kooijman <matthijs@stdin.nl>2020-05-06 21:57:16 +0300
committerCristian Maglie <c.maglie@bug.st>2020-05-11 18:13:17 +0300
commit149aa529e77600a425d0c09babaf34e744215a71 (patch)
tree81a9cd4e362c072e375806a7c315e79728c42de3 /arduino-core
parent0e4c900252b35ef439062ce16feb989f0fb732de (diff)
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.
Diffstat (limited to 'arduino-core')
-rw-r--r--arduino-core/src/processing/app/PreferencesData.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/arduino-core/src/processing/app/PreferencesData.java b/arduino-core/src/processing/app/PreferencesData.java
index 01f4568ad..11a250d68 100644
--- a/arduino-core/src/processing/app/PreferencesData.java
+++ b/arduino-core/src/processing/app/PreferencesData.java
@@ -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 {