Index: trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java	(revision 13434)
+++ trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java	(revision 13435)
@@ -251,5 +251,5 @@
     protected void updateEnabledState(Collection<? extends OsmPrimitive> selection) {
         int numWays = 0;
-        if (selection.stream().map(o -> o.getDataSet()).noneMatch(DataSet::isReadOnly)) {
+        if (selection.stream().map(OsmPrimitive::getDataSet).noneMatch(DataSet::isReadOnly)) {
             for (OsmPrimitive osm : selection) {
                 if (osm instanceof Way && !osm.isIncomplete() && ++numWays >= 2) {
Index: trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java	(revision 13434)
+++ trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java	(revision 13435)
@@ -191,5 +191,4 @@
         /**
          * Constructs a new {@code AbstractInternalTask}.
-         *
          * @param newLayer if {@code true}, force download to a new layer
          * @param title message for the user
@@ -207,5 +206,4 @@
         /**
          * Constructs a new {@code AbstractInternalTask}.
-         *
          * @param newLayer if {@code true}, force download to a new layer
          * @param title message for the user
@@ -287,5 +285,4 @@
                 // the user explicitly wants a new layer, we don't have any layer at all
                 // or it is not clear which layer to merge to
-                //
                 final OsmDataLayer layer = createNewLayer(newLayerName);
                 MainApplication.getLayerManager().addLayer(layer, zoomAfterDownload);
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/AddNoteAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/AddNoteAction.java	(revision 13434)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/AddNoteAction.java	(revision 13435)
@@ -17,6 +17,4 @@
 import org.openstreetmap.josm.gui.NoteInputDialog;
 import org.openstreetmap.josm.gui.Notification;
-import org.openstreetmap.josm.gui.layer.Layer;
-import org.openstreetmap.josm.gui.layer.NoteLayer;
 import org.openstreetmap.josm.gui.util.KeyPressReleaseListener;
 import org.openstreetmap.josm.tools.CheckParameterUtil;
@@ -102,8 +100,3 @@
         // Do nothing
     }
-
-    @Override
-    public boolean layerIsSupported(Layer l) {
-        return l instanceof NoteLayer;
-    }
 }
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 13434)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 13435)
@@ -670,7 +670,10 @@
             } else if (hasSelectionNearby || dragInProgress()) {
                 mode = Mode.MOVE;
-            }
-        }
-        mode = Mode.SELECT;
+            } else {
+                mode = Mode.SELECT;
+            }
+        } else {
+            mode = Mode.SELECT;
+        }
     }
 
Index: trunk/src/org/openstreetmap/josm/actions/relation/EditRelationAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/relation/EditRelationAction.java	(revision 13434)
+++ trunk/src/org/openstreetmap/josm/actions/relation/EditRelationAction.java	(revision 13435)
@@ -89,5 +89,5 @@
     protected void updateEnabledState() {
         boolean enabled = false;
-        if (relations.stream().map(r -> r.getDataSet()).noneMatch(DataSet::isReadOnly)) {
+        if (relations.stream().map(Relation::getDataSet).noneMatch(DataSet::isReadOnly)) {
             for (Relation r : relations) {
                 if (!r.isDeleted()) {
Index: trunk/src/org/openstreetmap/josm/gui/layer/MainLayerManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/MainLayerManager.java	(revision 13434)
+++ trunk/src/org/openstreetmap/josm/gui/layer/MainLayerManager.java	(revision 13435)
@@ -496,5 +496,5 @@
      * @param layer The OsmDataLayer to be uploaded
      */
-    public void prepareLayerForUpload(OsmDataLayer layer) {
+    public synchronized void prepareLayerForUpload(OsmDataLayer layer) {
         GuiHelper.assertCallFromEdt();
         layer.setUploadInProgress();
@@ -516,5 +516,5 @@
      * @param layer The OsmDataLayer uploaded
      */
-    public void processLayerAfterUpload(OsmDataLayer layer) {
+    public synchronized void processLayerAfterUpload(OsmDataLayer layer) {
         GuiHelper.assertCallFromEdt();
         layer.unsetReadOnly();
Index: trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 13434)
+++ trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 13435)
@@ -1188,4 +1188,8 @@
     }
 
+    /**
+     * Sets the "upload in progress" flag, which will result in displaying a new icon and forbid to remove the layer.
+     * @since 13434
+     */
     public void setUploadInProgress() {
         if (!isUploadInProgress.compareAndSet(false, true)) {
@@ -1194,4 +1198,8 @@
     }
 
+    /**
+     * Unsets the "upload in progress" flag, which will result in displaying the standard icon and allow to remove the layer.
+     * @since 13434
+     */
     public void unsetUploadInProgress() {
         if (!isUploadInProgress.compareAndSet(true, false)) {
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/tests/TagCheckerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/tests/TagCheckerTest.java	(revision 13434)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/tests/TagCheckerTest.java	(revision 13435)
@@ -12,4 +12,5 @@
 import org.junit.Rule;
 import org.junit.Test;
+import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.OsmUtils;
@@ -33,4 +34,5 @@
 
     List<TestError> test(OsmPrimitive primitive) throws IOException {
+        new DataSet(primitive);
         final TagChecker checker = new TagChecker();
         checker.initialize();
Index: trunk/test/unit/org/openstreetmap/josm/gui/history/HistoryBrowserModelTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/history/HistoryBrowserModelTest.java	(revision 13434)
+++ trunk/test/unit/org/openstreetmap/josm/gui/history/HistoryBrowserModelTest.java	(revision 13435)
@@ -31,5 +31,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().devAPI();
+    public JOSMTestRules test = new JOSMTestRules().preferences().devAPI().timeout(20000);
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/history/HistoryLoadTaskTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/history/HistoryLoadTaskTest.java	(revision 13434)
+++ trunk/test/unit/org/openstreetmap/josm/gui/history/HistoryLoadTaskTest.java	(revision 13435)
@@ -37,5 +37,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().devAPI();
+    public JOSMTestRules test = new JOSMTestRules().preferences().devAPI().timeout(20000);
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/io/DownloadOpenChangesetsTaskTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/io/DownloadOpenChangesetsTaskTest.java	(revision 13434)
+++ trunk/test/unit/org/openstreetmap/josm/gui/io/DownloadOpenChangesetsTaskTest.java	(revision 13435)
@@ -25,5 +25,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().devAPI();
+    public JOSMTestRules test = new JOSMTestRules().preferences().devAPI().timeout(20000);
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/io/DownloadPrimitivesTaskTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/io/DownloadPrimitivesTaskTest.java	(revision 13434)
+++ trunk/test/unit/org/openstreetmap/josm/gui/io/DownloadPrimitivesTaskTest.java	(revision 13435)
@@ -28,5 +28,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().devAPI();
+    public JOSMTestRules test = new JOSMTestRules().preferences().devAPI().timeout(20000);
 
     /**
