Index: trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 17534)
+++ trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 17541)
@@ -518,5 +518,5 @@
      * @throws IOException if any I/O error occurs
      */
-    public void fromXML(Reader in) throws XMLStreamException, IOException {
+    public synchronized void fromXML(Reader in) throws XMLStreamException, IOException {
         PreferencesReader reader = new PreferencesReader(in, false);
         reader.parse();
@@ -529,5 +529,5 @@
      * @param reset if {@code true}, current settings file is replaced by the default one
      */
-    public void init(boolean reset) {
+    public synchronized void init(boolean reset) {
         initSuccessful = false;
         // get the preferences.
@@ -671,5 +671,5 @@
      * Reset all values stored in this map to the default values. This clears the preferences.
      */
-    public final void resetToDefault() {
+    public final synchronized void resetToDefault() {
         settingsMap.clear();
     }
@@ -683,5 +683,5 @@
      */
     @Override
-    public boolean putSetting(final String key, Setting<?> setting) {
+    public synchronized boolean putSetting(final String key, Setting<?> setting) {
         CheckParameterUtil.ensureParameterNotNull(key);
         if (setting != null && setting.getValue() == null)
@@ -816,5 +816,5 @@
      * @return XML
      */
-    public String toXML(boolean nopass) {
+    public synchronized String toXML(boolean nopass) {
         return toXML(settingsMap.entrySet(), nopass, false);
     }
