Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/UploadUtils.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/UploadUtils.java	(revision 31840)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/UploadUtils.java	(revision 31841)
@@ -56,9 +56,19 @@
 public class UploadUtils {
 
+  /** Required keys for POST */
+  private static final String[] keys = { "key", "AWSAccessKeyId", "acl",
+      "policy", "signature", "Content-Type" };
+
+  /** Mapillary upload URL */
+  private static final String UPLOAD_URL = "https://s3-eu-west-1.amazonaws.com/mapillary.uploads.manual.images";
+
+  /** Count to name temporal files. */
+  private static int c;
+
   private static class SequenceUploadThread extends Thread {
     private final List<MapillaryAbstractImage> images;
     private final UUID uuid;
     private final boolean delete;
-    private ThreadPoolExecutor ex;
+    private final ThreadPoolExecutor ex;
 
     private SequenceUploadThread(List<MapillaryAbstractImage> images,
@@ -66,6 +76,5 @@
       this.images = images;
       this.uuid = UUID.randomUUID();
-      this.ex = new ThreadPoolExecutor(8, 8, 25, TimeUnit.SECONDS,
-          new ArrayBlockingQueue<Runnable>(15));
+      this.ex = new ThreadPoolExecutor(8, 8, 25, TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(15));
       this.delete = delete;
     }
@@ -77,9 +86,7 @@
       for (MapillaryAbstractImage img : this.images) {
         if (!(img instanceof MapillaryImportedImage))
-          throw new IllegalArgumentException(
-              "The sequence contains downloaded images.");
-        this.ex.execute(new SingleUploadThread((MapillaryImportedImage) img,
-            this.uuid));
-        while (this.ex.getQueue().remainingCapacity() == 0)
+          throw new IllegalArgumentException("The sequence contains downloaded images.");
+        this.ex.execute(new SingleUploadThread((MapillaryImportedImage) img, this.uuid));
+        while (this.ex.getQueue().remainingCapacity() == 0) {
           try {
             Thread.sleep(100);
@@ -87,4 +94,5 @@
             Main.error(e);
           }
+        }
       }
       this.ex.shutdown();
@@ -114,13 +122,4 @@
     }
   }
-  /** Required keys for POST */
-  private static final String[] keys = { "key", "AWSAccessKeyId", "acl",
-      "policy", "signature", "Content-Type" };
-
-  /** Mapillary upload URL */
-  private static final String UPLOAD_URL = "https://s3-eu-west-1.amazonaws.com/mapillary.uploads.manual.images";
-
-  /** Count to name temporal files. */
-  private static int c = 0;
 
   /**
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils/PluginState.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils/PluginState.java	(revision 31840)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils/PluginState.java	(revision 31841)
@@ -15,5 +15,5 @@
  *
  */
-public class PluginState {
+public final class PluginState {
 
   private static int runningDownloads;
