Index: /trunk/src/org/openstreetmap/josm/Main.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/Main.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/Main.java	(revision 8126)
@@ -154,5 +154,5 @@
      * Global application.
      */
-    public static Main main;
+    public static volatile Main main;
 
     /**
@@ -191,5 +191,5 @@
      * The toolbar preference control to register new actions.
      */
-    public static ToolbarPreferences toolbar;
+    public static volatile ToolbarPreferences toolbar;
 
     /**
@@ -468,5 +468,5 @@
      * to the JOSM team for inclusion.
      */
-    public static PlatformHook platform;
+    public static volatile PlatformHook platform;
 
     /**
@@ -525,5 +525,5 @@
     }
 
-    private static InitStatusListener initListener = null;
+    private static volatile InitStatusListener initListener = null;
 
     public static interface InitStatusListener {
@@ -892,5 +892,5 @@
     public static final JPanel panel = new JPanel(new BorderLayout());
 
-    protected static WindowGeometry geometry;
+    protected static volatile WindowGeometry geometry;
     protected static int windowState = JFrame.NORMAL;
 
@@ -1305,5 +1305,5 @@
      * Use {@link #setProjection(Projection)} in order to trigger a projection change event.
      */
-    private static Projection proj;
+    private static volatile Projection proj;
 
     /**
@@ -1481,5 +1481,5 @@
         private static MasterWindowListener INSTANCE;
 
-        public static MasterWindowListener getInstance() {
+        public static synchronized MasterWindowListener getInstance() {
             if (INSTANCE == null) {
                 INSTANCE = new MasterWindowListener();
Index: /trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java	(revision 8126)
@@ -39,5 +39,5 @@
  */
 public class ImageryAdjustAction extends MapMode implements MouseListener, MouseMotionListener, AWTEventListener{
-    private static ImageryOffsetDialog offsetDialog;
+    private static volatile ImageryOffsetDialog offsetDialog;
     private static Cursor cursor = ImageProvider.getCursor("normal", "move");
 
Index: /trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 8126)
@@ -125,5 +125,5 @@
     }
 
-    private static SearchSetting lastSearch = null;
+    private static volatile SearchSetting lastSearch = null;
 
     /**
Index: /trunk/src/org/openstreetmap/josm/corrector/CorrectionTable.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/corrector/CorrectionTable.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/corrector/CorrectionTable.java	(revision 8126)
@@ -32,5 +32,5 @@
     }
 
-    private static BoldRenderer boldRenderer = null;
+    private static volatile BoldRenderer boldRenderer = null;
 
     protected CorrectionTable(T correctionTableModel) {
Index: /trunk/src/org/openstreetmap/josm/data/Version.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/Version.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/data/Version.java	(revision 8126)
@@ -57,5 +57,5 @@
      * @return the unique instance of the version information
      */
-    public static Version getInstance() {
+    public static synchronized Version getInstance() {
         if (instance == null) {
             instance = new Version();
Index: /trunk/src/org/openstreetmap/josm/data/coor/CoordinateFormat.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/coor/CoordinateFormat.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/data/coor/CoordinateFormat.java	(revision 8126)
@@ -49,5 +49,5 @@
     }
 
-    private static CoordinateFormat defaultCoordinateFormat = DECIMAL_DEGREES;
+    private static volatile CoordinateFormat defaultCoordinateFormat = DECIMAL_DEGREES;
 
     /**
Index: /trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSet.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSet.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSet.java	(revision 8126)
@@ -35,5 +35,5 @@
      * @return the unique instance of the history data set
      */
-    public static HistoryDataSet getInstance() {
+    public static synchronized HistoryDataSet getInstance() {
         if (historyDataSet == null) {
             historyDataSet = new HistoryDataSet();
Index: /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapRendererFactory.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapRendererFactory.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapRendererFactory.java	(revision 8126)
@@ -91,5 +91,5 @@
      * @return instance of map rending class
      */
-    public static MapRendererFactory getInstance() {
+    public static synchronized MapRendererFactory getInstance() {
         if (instance == null) {
             instance = new MapRendererFactory();
Index: /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/PaintColors.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/PaintColors.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/PaintColors.java	(revision 8126)
@@ -10,6 +10,6 @@
 import org.openstreetmap.josm.data.Preferences.ColorKey;
 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
+import org.openstreetmap.josm.gui.mappaint.MapPaintStyles.MapPaintSylesUpdateListener;
 import org.openstreetmap.josm.gui.mappaint.StyleSource;
-import org.openstreetmap.josm.gui.mappaint.MapPaintStyles.MapPaintSylesUpdateListener;
 
 public enum PaintColors implements ColorKey {
@@ -35,5 +35,5 @@
     private final Color defaultColor;
 
-    private static Color backgroundColorCache = null;
+    private static volatile Color backgroundColorCache = null;
 
     private static final MapPaintSylesUpdateListener styleOverrideListener = new MapPaintSylesUpdateListener() {
Index: /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java	(revision 8126)
@@ -149,5 +149,5 @@
      */
     private static MultipolygonRoleMatcher roleMatcher;
-    private static MultipolygonRoleMatcher getMultipolygonRoleMatcher() {
+    private static synchronized MultipolygonRoleMatcher getMultipolygonRoleMatcher() {
         if (roleMatcher == null) {
             roleMatcher = new MultipolygonRoleMatcher();
Index: /trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 8126)
@@ -72,5 +72,5 @@
 public class OsmValidator implements LayerChangeListener {
 
-    public static ValidatorLayer errorLayer = null;
+    public static volatile ValidatorLayer errorLayer = null;
 
     /** The validate action */
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java	(revision 8126)
@@ -57,5 +57,5 @@
     protected static final int OUTER_STYLE = 1613;
 
-    private static ElemStyles styles;
+    private static volatile ElemStyles styles;
 
     private final List<List<Node>> nonClosedWays = new ArrayList<>();
@@ -222,5 +222,5 @@
                     } else {
                         /* old style multipolygon - solve: copy tags from outer way to multipolygon */
-                        addError(r, new TestError(this, Severity.WARNING, 
+                        addError(r, new TestError(this, Severity.WARNING,
                                 trn("Multipolygon relation should be tagged with area tags and not the outer way",
                                         "Multipolygon relation should be tagged with area tags and not the outer ways", polygon.getOuterWays().size()),
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 8126)
@@ -71,7 +71,7 @@
 
     /** The spell check key substitutions: the key should be substituted by the value */
-    private static Map<String, String> spellCheckKeyData;
+    private static volatile Map<String, String> spellCheckKeyData;
     /** The spell check preset values */
-    private static MultiMap<String, String> presetsValueData;
+    private static volatile MultiMap<String, String> presetsValueData;
     /** The TagChecker data */
     private static final List<CheckerData> checkerData = new ArrayList<>();
@@ -364,5 +364,5 @@
                 withErrors.put(p, "IPK");
             }
-            if (checkKeys && key.indexOf(' ') >= 0 && !withErrors.contains(p, "IPK")) {
+            if (checkKeys && key != null && key.indexOf(' ') >= 0 && !withErrors.contains(p, "IPK")) {
                 errors.add( new TestError(this, Severity.WARNING, tr("Invalid white space in property key"),
                         tr(s, key), MessageFormat.format(s, key), INVALID_KEY_SPACE, p) );
@@ -379,5 +379,5 @@
                 withErrors.put(p, "HTML");
             }
-            if (checkValues && value != null && value.length() > 0 && presetsValueData != null) {
+            if (checkValues && key != null && value != null && value.length() > 0 && presetsValueData != null) {
                 final Set<String> values = presetsValueData.get(key);
                 final boolean keyInPresets = values != null;
@@ -423,5 +423,5 @@
                 }
             }
-            if (checkFixmes && value != null && value.length() > 0) {
+            if (checkFixmes && key != null && value != null && value.length() > 0) {
                 if ((value.toLowerCase().contains("fixme")
                         || value.contains("check and delete")
Index: /trunk/src/org/openstreetmap/josm/data/validation/util/Entities.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/util/Entities.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/data/validation/util/Entities.java	(revision 8126)
@@ -334,5 +334,5 @@
     };
 
-    private static Map<String, String> mapNameToValue = null;
+    private static volatile Map<String, String> mapNameToValue = null;
 
     public String unescape(String str) {
Index: /trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java	(revision 8126)
@@ -59,5 +59,5 @@
      * @return the unique instance of this formatter
      */
-    public static DefaultNameFormatter getInstance() {
+    public static synchronized DefaultNameFormatter getInstance() {
         if (instance == null) {
             instance = new DefaultNameFormatter();
@@ -109,5 +109,5 @@
      * @return the list of naming tags used in relations
      */
-    public static List<String> getNamingtagsForRelations() {
+    public static synchronized List<String> getNamingtagsForRelations() {
         if (namingTagsForRelations == null) {
             namingTagsForRelations = new ArrayList<>(
Index: /trunk/src/org/openstreetmap/josm/gui/FileDrop.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/FileDrop.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/FileDrop.java	(revision 8126)
@@ -280,5 +280,5 @@
     }   // end constructor
 
-    private static boolean supportsDnD()
+    private static synchronized boolean supportsDnD()
     {   // Static Boolean
         if( supportsDnD == null )
Index: /trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java	(revision 8126)
@@ -59,5 +59,5 @@
      * @return the unique instance of the JOSM user identity manager
      */
-    public static JosmUserIdentityManager getInstance() {
+    public static synchronized JosmUserIdentityManager getInstance() {
         if (instance == null) {
             instance = new JosmUserIdentityManager();
@@ -283,5 +283,5 @@
             if (OsmApi.isUsingOAuth()) {
                 try {
-                    instance.initFromOAuth(Main.parent);
+                    getInstance().initFromOAuth(Main.parent);
                 } catch (Exception e) {
                     Main.error(e);
Index: /trunk/src/org/openstreetmap/josm/gui/NotificationManager.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/NotificationManager.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/NotificationManager.java	(revision 8126)
@@ -76,5 +76,5 @@
     private final Color PANEL_OPAQUE = new Color(224, 236, 249);
 
-    public static NotificationManager getInstance() {
+    public static synchronized NotificationManager getInstance() {
         if (INSTANCE == null) {
             INSTANCE = new NotificationManager();
Index: /trunk/src/org/openstreetmap/josm/gui/actionsupport/DeleteFromRelationConfirmationDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/actionsupport/DeleteFromRelationConfirmationDialog.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/actionsupport/DeleteFromRelationConfirmationDialog.java	(revision 8126)
@@ -59,5 +59,5 @@
      * @return The unique instance of this dialog
      */
-    public static DeleteFromRelationConfirmationDialog getInstance() {
+    public static synchronized DeleteFromRelationConfirmationDialog getInstance() {
         if (instance == null) {
             instance = new DeleteFromRelationConfirmationDialog();
Index: /trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java	(revision 8126)
@@ -100,5 +100,5 @@
      */
     @Deprecated
-    public static CombinePrimitiveResolverDialog getInstance() {
+    public static synchronized CombinePrimitiveResolverDialog getInstance() {
         if (instance == null) {
             GuiHelper.runInEDTAndWait(new Runnable() {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java	(revision 8126)
@@ -80,5 +80,5 @@
 public class LayerListDialog extends ToggleDialog {
     /** the unique instance of the dialog */
-    private static LayerListDialog instance;
+    private static volatile LayerListDialog instance;
 
     /**
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManager.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManager.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManager.java	(revision 8126)
@@ -69,5 +69,5 @@
 
     /** the unique instance of the cache manager  */
-    private static ChangesetCacheManager instance;
+    private static volatile ChangesetCacheManager instance;
 
     /**
Index: /trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java	(revision 8126)
@@ -60,5 +60,5 @@
      * @return the unique instance of the download dialog
      */
-    public static DownloadDialog getInstance() {
+    public static synchronized DownloadDialog getInstance() {
         if (instance == null) {
             instance = new DownloadDialog(Main.parent);
Index: /trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java	(revision 8126)
@@ -72,5 +72,5 @@
      * @return the unique instance of the help browser
      */
-    public static HelpBrowser getInstance() {
+    public static synchronized HelpBrowser getInstance() {
         if (instance == null) {
             instance = new HelpBrowser();
Index: /trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java	(revision 8126)
@@ -38,5 +38,5 @@
      * @return the unique instance
      */
-    public static HistoryBrowserDialogManager getInstance() {
+    public static synchronized HistoryBrowserDialogManager getInstance() {
         if (instance == null) {
             instance = new HistoryBrowserDialogManager();
Index: /trunk/src/org/openstreetmap/josm/gui/io/ChangesetCommentModel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/ChangesetCommentModel.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/io/ChangesetCommentModel.java	(revision 8126)
@@ -2,4 +2,5 @@
 package org.openstreetmap.josm.gui.io;
 
+import java.util.Objects;
 import java.util.Observable;
 
@@ -7,5 +8,5 @@
  * ChangesetCommentModel is an observable model for the changeset comment edited
  * in the {@link UploadDialog}.
- *
+ * @since 3133
  */
 public class ChangesetCommentModel extends Observable {
@@ -13,6 +14,5 @@
 
     /**
-     * Sets the current changeset comment and notifies observers if the comment
-     * has changed.
+     * Sets the current changeset comment and notifies observers if the comment has changed.
      *
      * @param comment the new upload comment. Empty string assumed if null.
@@ -21,5 +21,5 @@
         String oldValue = this.comment;
         this.comment = comment == null ? "" : comment;
-        if (!oldValue.equals(this.comment)) {
+        if (!Objects.equals(oldValue, this.comment)) {
             setChanged();
             notifyObservers(this.comment);
Index: /trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java	(revision 8126)
@@ -74,5 +74,5 @@
      * @return the unique instance of the upload dialog
      */
-    public static UploadDialog getUploadDialog() {
+    public static synchronized UploadDialog getUploadDialog() {
         if (uploadDialog == null) {
             uploadDialog = new UploadDialog();
Index: /trunk/src/org/openstreetmap/josm/gui/layer/JumpToMarkerActions.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/JumpToMarkerActions.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/JumpToMarkerActions.java	(revision 8126)
@@ -27,6 +27,6 @@
     }
 
-    private static JumpToNextMarker jumpToNextMarkerAction;
-    private static JumpToPreviousMarker jumpToPreviousMarkerAction;
+    private static volatile JumpToNextMarker jumpToNextMarkerAction;
+    private static volatile JumpToPreviousMarker jumpToPreviousMarkerAction;
 
     public static void initialize() {
Index: /trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 8126)
@@ -232,5 +232,5 @@
      * a paint texture for non-downloaded area
      */
-    private static TexturePaint hatched;
+    private static volatile TexturePaint hatched;
 
     static {
Index: /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(revision 8126)
@@ -902,5 +902,5 @@
     }
 
-    private static List<MapMode> supportedMapModes = null;
+    private static volatile List<MapMode> supportedMapModes = null;
 
     /**
Index: /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java	(revision 8126)
@@ -49,5 +49,5 @@
 
     // Only one instance of that class is present at one time
-    private static ImageViewerDialog dialog;
+    private static volatile ImageViewerDialog dialog;
 
     private boolean collapseButtonClicked = false;
Index: /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/AudioMarker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/AudioMarker.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/AudioMarker.java	(revision 8126)
@@ -23,5 +23,5 @@
 
     private URL audioUrl;
-    private static AudioMarker recentlyPlayedMarker = null;
+    private static volatile AudioMarker recentlyPlayedMarker = null;
     public double syncOffset;
     public boolean timeFromAudio = false; // as opposed to from the GPX track
Index: /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java	(revision 8126)
@@ -38,5 +38,5 @@
     private Timer timer = null;
     private double animationInterval = 0.0; // seconds
-    private static PlayHeadMarker playHead = null;
+    private static volatile PlayHeadMarker playHead = null;
     private MapMode oldMode = null;
     private LatLon oldCoor;
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java	(revision 8126)
@@ -172,5 +172,5 @@
      * session. There should be preference listener updating this cache.
      */
-    private static Color DEFAULT_TEXT_COLOR = null;
+    private static volatile Color DEFAULT_TEXT_COLOR = null;
     private static void initDefaultParameters() {
         if (DEFAULT_TEXT_COLOR != null) return;
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSource.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSource.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSource.java	(revision 8126)
@@ -135,5 +135,5 @@
      * @see #getIconProvider()
      */
-    private static ImageProvider getDefaultIconProvider() {
+    private static synchronized ImageProvider getDefaultIconProvider() {
         if (defaultIconProvider == null) {
             defaultIconProvider = new ImageProvider("dialogs/mappaint", "pencil");
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAccessTokenHolder.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAccessTokenHolder.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAccessTokenHolder.java	(revision 8126)
@@ -21,5 +21,5 @@
      * @return The unique instance of {@code OAuthAccessTokenHolder}
      */
-    public static OAuthAccessTokenHolder getInstance() {
+    public static synchronized OAuthAccessTokenHolder getInstance() {
         if (instance == null) {
             instance = new OAuthAccessTokenHolder();
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetNameTemplateList.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetNameTemplateList.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetNameTemplateList.java	(revision 8126)
@@ -21,5 +21,5 @@
      * @return the unique instance
      */
-    public static TaggingPresetNameTemplateList getInstance() {
+    public static synchronized TaggingPresetNameTemplateList getInstance() {
         if (instance == null) {
             instance = new TaggingPresetNameTemplateList();
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetReader.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetReader.java	(revision 8126)
@@ -46,5 +46,5 @@
     }
 
-    private static File zipIcons = null;
+    private static volatile File zipIcons = null;
 
     /**
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSearchDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSearchDialog.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSearchDialog.java	(revision 8126)
@@ -25,5 +25,5 @@
      * @return the unique instance of {@code TaggingPresetSearchDialog}.
      */
-    public static TaggingPresetSearchDialog getInstance() {
+    public static synchronized TaggingPresetSearchDialog getInstance() {
         if (instance == null) {
             instance = new TaggingPresetSearchDialog();
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSearchPrimitiveDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSearchPrimitiveDialog.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSearchPrimitiveDialog.java	(revision 8126)
@@ -1,3 +1,10 @@
 package org.openstreetmap.josm.gui.tagging;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.util.HashSet;
 
 import org.openstreetmap.josm.Main;
@@ -7,11 +14,4 @@
 import org.openstreetmap.josm.tools.Shortcut;
 import org.openstreetmap.josm.tools.Utils;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.KeyEvent;
-import java.util.HashSet;
-
-import static org.openstreetmap.josm.tools.I18n.tr;
 
 /**
@@ -29,5 +29,5 @@
      * @return the unique instance of {@code TaggingPresetSearchPrimitiveDialog}.
      */
-    public static TaggingPresetSearchPrimitiveDialog getInstance() {
+    public static synchronized TaggingPresetSearchPrimitiveDialog getInstance() {
         if (instance == null) {
             instance = new TaggingPresetSearchPrimitiveDialog();
Index: /trunk/src/org/openstreetmap/josm/gui/util/FileFilterAllFiles.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/util/FileFilterAllFiles.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/util/FileFilterAllFiles.java	(revision 8126)
@@ -10,4 +10,5 @@
 /**
  * A FileFilter that accepts all files.
+ * @since 5572
  */
 public class FileFilterAllFiles extends FileFilter {
@@ -15,5 +16,9 @@
     private static FileFilterAllFiles INSTANCE;
 
-    public static FileFilterAllFiles getInstance() {
+    /**
+     * Replies the unique instance.
+     * @return the unique instance
+     */
+    public static synchronized FileFilterAllFiles getInstance() {
         if (INSTANCE == null) {
             INSTANCE = new FileFilterAllFiles();
Index: /trunk/src/org/openstreetmap/josm/gui/util/StayOpenCheckBoxMenuItem.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/util/StayOpenCheckBoxMenuItem.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/util/StayOpenCheckBoxMenuItem.java	(revision 8126)
@@ -18,5 +18,5 @@
 public class StayOpenCheckBoxMenuItem extends JCheckBoxMenuItem {
 
-  private static MenuElement[] path;
+  private static volatile MenuElement[] path;
 
   {
Index: /trunk/src/org/openstreetmap/josm/gui/util/StayOpenMenuItem.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/util/StayOpenMenuItem.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/util/StayOpenMenuItem.java	(revision 8126)
@@ -17,5 +17,5 @@
 public class StayOpenMenuItem extends JMenuItem {
 
-  private static MenuElement[] path;
+  private static volatile MenuElement[] path;
 
   {
Index: /trunk/src/org/openstreetmap/josm/gui/util/StayOpenRadioButtonMenuItem.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/util/StayOpenRadioButtonMenuItem.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/util/StayOpenRadioButtonMenuItem.java	(revision 8126)
@@ -17,5 +17,5 @@
 public class StayOpenRadioButtonMenuItem extends JRadioButtonMenuItem {
 
-  private static MenuElement[] path;
+  private static volatile MenuElement[] path;
 
   {
Index: /trunk/src/org/openstreetmap/josm/gui/widgets/AbstractFileChooser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/widgets/AbstractFileChooser.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/gui/widgets/AbstractFileChooser.java	(revision 8126)
@@ -16,5 +16,5 @@
 
     /** The locale for both implementations */
-    protected static Locale locale;
+    protected static volatile Locale locale;
 
     /**
Index: /trunk/src/org/openstreetmap/josm/io/MessageNotifier.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/MessageNotifier.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/io/MessageNotifier.java	(revision 8126)
@@ -50,5 +50,5 @@
     private static final Runnable WORKER = new Worker();
 
-    private static ScheduledFuture<?> task = null;
+    private static volatile ScheduledFuture<?> task = null;
 
     private static class Worker implements Runnable {
Index: /trunk/src/org/openstreetmap/josm/io/OsmReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmReader.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/io/OsmReader.java	(revision 8126)
@@ -55,5 +55,5 @@
 
     /** Used by plugins to register themselves as data postprocessors. */
-    private static List<OsmServerReadPostprocessor> postprocessors;
+    private static volatile List<OsmServerReadPostprocessor> postprocessors;
 
     /** register a new postprocessor */
Index: /trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java	(revision 8126)
@@ -37,5 +37,5 @@
     private Collection<OsmPrimitive> processed;
 
-    private static List<OsmServerWritePostprocessor> postprocessors;
+    private static volatile List<OsmServerWritePostprocessor> postprocessors;
     public static void registerPostprocessor(OsmServerWritePostprocessor pp) {
         if (postprocessors == null) {
Index: /trunk/src/org/openstreetmap/josm/io/OsmWriterFactory.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmWriterFactory.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/io/OsmWriterFactory.java	(revision 8126)
@@ -17,5 +17,5 @@
 public class OsmWriterFactory {
 
-    public static OsmWriterFactory theFactory;
+    public static volatile OsmWriterFactory theFactory;
     public static OsmWriter createOsmWriter(PrintWriter out, boolean osmConform, String version) {
         // pre-set factory with this default implementation; can still be overwritten
Index: /trunk/src/org/openstreetmap/josm/io/auth/CredentialsManager.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/auth/CredentialsManager.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/io/auth/CredentialsManager.java	(revision 8126)
@@ -20,5 +20,5 @@
 public class CredentialsManager implements CredentialsAgent {
 
-    private static CredentialsManager instance;
+    private static volatile CredentialsManager instance;
 
     /**
Index: /trunk/src/org/openstreetmap/josm/io/auth/DefaultAuthenticator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/auth/DefaultAuthenticator.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/io/auth/DefaultAuthenticator.java	(revision 8126)
@@ -16,5 +16,5 @@
  */
 public final class DefaultAuthenticator extends Authenticator {
-    private static DefaultAuthenticator instance;
+    private static volatile DefaultAuthenticator instance;
 
     /**
Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java	(revision 8126)
@@ -23,5 +23,5 @@
     private ServerSocket server;
 
-    private static RemoteControlHttpServer instance;
+    private static volatile RemoteControlHttpServer instance;
 
     /**
Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java	(revision 8126)
@@ -75,5 +75,5 @@
     private ServerSocket server;
 
-    private static RemoteControlHttpsServer instance;
+    private static volatile RemoteControlHttpsServer instance;
     private boolean initOK = false;
     private SSLContext sslContext;
Index: /trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 8126)
@@ -566,5 +566,5 @@
      * @return the class loader
      */
-    public static DynamicURLClassLoader getPluginClassLoader() {
+    public static synchronized DynamicURLClassLoader getPluginClassLoader() {
         if (pluginClassLoader == null) {
             pluginClassLoader = AccessController.doPrivileged(new PrivilegedAction<DynamicURLClassLoader>() {
Index: /trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java	(revision 8126)
@@ -26,5 +26,5 @@
 public final class AudioPlayer extends Thread {
 
-    private static AudioPlayer audioPlayer = null;
+    private static volatile AudioPlayer audioPlayer = null;
 
     private enum State { INITIALIZING, NOTPLAYING, PLAYING, PAUSED, INTERRUPTED }
Index: /trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java	(revision 8126)
@@ -42,5 +42,5 @@
 
     private static boolean handlingInProgress = false;
-    private static BugReporterThread bugReporterThread = null;
+    private static volatile BugReporterThread bugReporterThread = null;
     private static int exceptionCounter = 0;
     private static boolean suppressExceptionDialogs = false;
Index: /trunk/src/org/openstreetmap/josm/tools/I18n.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 8126)
@@ -76,6 +76,6 @@
     }
 
-    private static PluralMode pluralMode = PluralMode.MODE_NOTONE; /* english default */
-    private static String loadedCode = "en";
+    private static volatile PluralMode pluralMode = PluralMode.MODE_NOTONE; /* english default */
+    private static volatile String loadedCode = "en";
 
     /* Localization keys for file chooser (and color chooser). */
@@ -164,6 +164,6 @@
         "OptionPane.cancelButtonText"
     };
-    private static Map<String, String> strings = null;
-    private static Map<String, String[]> pstrings = null;
+    private static volatile Map<String, String> strings = null;
+    private static volatile Map<String, String[]> pstrings = null;
     private static Map<String, PluralMode> languages = new HashMap<>();
 
Index: /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 8126)
@@ -1356,5 +1356,5 @@
     }
 
-    private static SVGUniverse getSvgUniverse() {
+    private static synchronized SVGUniverse getSvgUniverse() {
         if (svgUniverse == null) {
             svgUniverse = new SVGUniverse();
Index: /trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java	(revision 8126)
@@ -124,5 +124,5 @@
      * @return The unique instance of this class
      */
-    public static MultikeyActionsHandler getInstance() {
+    public static synchronized MultikeyActionsHandler getInstance() {
         if (instance == null) {
             instance = new MultikeyActionsHandler();
Index: /trunk/src/org/openstreetmap/josm/tools/RightAndLefthandTraffic.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/RightAndLefthandTraffic.java	(revision 8125)
+++ /trunk/src/org/openstreetmap/josm/tools/RightAndLefthandTraffic.java	(revision 8126)
@@ -7,4 +7,5 @@
 import java.util.ArrayList;
 import java.util.Collection;
+
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.BBox;
@@ -47,6 +48,6 @@
     }
 
-    private static Collection<Area> leftHandTrafficPolygons;
-    private static GeoPropertyIndex<Boolean> rlCache;
+    private static volatile Collection<Area> leftHandTrafficPolygons;
+    private static volatile GeoPropertyIndex<Boolean> rlCache;
 
     /**
