Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryData.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryData.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryData.java	(revision 32979)
@@ -8,4 +8,5 @@
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.stream.Collectors;
 
 import org.openstreetmap.josm.Main;
@@ -143,13 +144,11 @@
    */
   public void addMultiSelectedImage(Set<MapillaryAbstractImage> images) {
-    for (MapillaryAbstractImage image : images) {
-      if (!this.multiSelectedImages.contains(image)) {
-        if (this.getSelectedImage() == null) {
-          this.setSelectedImage(image);
-        } else {
-          this.multiSelectedImages.add(image);
-        }
-      }
-    }
+    images.stream().filter(image -> !this.multiSelectedImages.contains(image)).forEach(image -> {
+      if (this.getSelectedImage() == null) {
+        this.setSelectedImage(image);
+      } else {
+        this.multiSelectedImages.add(image);
+      }
+    });
     Main.map.mapView.repaint();
   }
@@ -186,7 +185,5 @@
    */
   public synchronized void remove(Set<MapillaryAbstractImage> images) {
-    for (MapillaryAbstractImage img : images) {
-      remove(img);
-    }
+    images.forEach(this::remove);
   }
 
@@ -240,8 +237,5 @@
    */
   public synchronized Set<MapillarySequence> getSequences() {
-    Set<MapillarySequence> result = new HashSet<>();
-    for (MapillaryAbstractImage img : getImages()) {
-      result.add(img.getSequence());
-    }
+    Set<MapillarySequence> result = getImages().stream().map(MapillaryAbstractImage::getSequence).collect(Collectors.toSet());
     return result;
   }
@@ -259,8 +253,5 @@
     if (this.listeners.isEmpty())
       return;
-    for (MapillaryDataListener lis : this.listeners) {
-      if (lis != null)
-        lis.imagesAdded();
-    }
+    this.listeners.stream().filter(lis -> lis != null).forEach(MapillaryDataListener::imagesAdded);
   }
 
@@ -385,8 +376,5 @@
     if (this.listeners.isEmpty())
       return;
-    for (MapillaryDataListener lis : this.listeners) {
-      if (lis != null)
-        lis.selectedImageChanged(oldImage, newImage);
-    }
+    this.listeners.stream().filter(lis -> lis != null).forEach(lis -> lis.selectedImageChanged(oldImage, newImage));
   }
 
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryImportedImage.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryImportedImage.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryImportedImage.java	(revision 32979)
@@ -83,7 +83,5 @@
   @Override
   public boolean equals(Object other) {
-    if (other != null && other.getClass() == this.getClass())
-      return this.file.equals(((MapillaryImportedImage) other).file);
-    return false;
+    return other != null && other.getClass() == this.getClass() && this.file.equals(((MapillaryImportedImage) other).file);
   }
 
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java	(revision 32979)
@@ -69,12 +69,11 @@
  *
  * @author nokutu
- *
  */
 public final class MapillaryLayer extends AbstractModifiableLayer implements
-    DataSetListener, ActiveLayerChangeListener {
+  DataSetListener, ActiveLayerChangeListener {
 
   /** Maximum distance for the red/blue lines. */
   public static final int SEQUENCE_MAX_JUMP_DISTANCE = Main.pref.getInteger(
-      "mapillary.sequence-max-jump-distance", 100);
+    "mapillary.sequence-max-jump-distance", 100);
 
   /** If the download is in semiautomatic during this object lifetime. */
@@ -132,8 +131,8 @@
     if (Main.main != null) {
       MapillaryMainDialog.getInstance()
-          .getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW)
-          .put(KeyStroke.getKeyStroke("DELETE"), "MapillaryDel");
+        .getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW)
+        .put(KeyStroke.getKeyStroke("DELETE"), "MapillaryDel");
       MapillaryMainDialog.getInstance().getActionMap()
-          .put("MapillaryDel", new DeleteImageAction());
+        .put("MapillaryDel", new DeleteImageAction());
     }
 
@@ -146,6 +145,5 @@
    * Changes the mode the the given one.
    *
-   * @param mode
-   *          The mode that is going to be activated.
+   * @param mode The mode that is going to be activated.
    */
   public void setMode(AbstractMode mode) {
@@ -354,8 +352,8 @@
         if (imageAbs instanceof MapillaryImage && !((MapillaryImage) imageAbs).getSigns().isEmpty()) {
           g.drawImage(
-              MapillaryPlugin.MAP_SIGN.getImage(),
-              p.x - MapillaryPlugin.MAP_SIGN.getIconWidth() / 2,
-              p.y - MapillaryPlugin.MAP_SIGN.getIconHeight() / 2,
-              Main.map.mapView
+            MapillaryPlugin.MAP_SIGN.getImage(),
+            p.x - MapillaryPlugin.MAP_SIGN.getIconWidth() / 2,
+            p.y - MapillaryPlugin.MAP_SIGN.getIconHeight() / 2,
+            Main.map.mapView
           );
         }
@@ -370,7 +368,7 @@
    * Draws the highlight of the icon.
    *
-   * @param g  the graphics context
-   * @param p  the {@link Point} where the image must be set.
-   * @param size  the width in pixels of the highlight.
+   * @param g the graphics context
+   * @param p the {@link Point} where the image must be set.
+   * @param size the width in pixels of the highlight.
    */
   private void drawPointHighlight(Graphics2D g, Point p, int size) {
@@ -378,5 +376,5 @@
     Color highlightColor = PaintColors.HIGHLIGHT.get();
     Color highlightColorTransparent = new Color(highlightColor.getRed(),
-        highlightColor.getGreen(), highlightColor.getBlue(), 100);
+      highlightColor.getGreen(), highlightColor.getBlue(), 100);
     g.setColor(highlightColorTransparent);
     int s = size + this.highlightPointRadius;
@@ -393,8 +391,8 @@
    * image.
    *
-   * @param g  the graphics context
-   * @param image  The {@link MapillaryAbstractImage} which is being drown.
-   * @param icon  The {@link ImageIcon} that represents the image.
-   * @param p  The P¡{@link Point} when the image lies.
+   * @param g the graphics context
+   * @param image The {@link MapillaryAbstractImage} which is being drown.
+   * @param icon The {@link ImageIcon} that represents the image.
+   * @param p The P¡{@link Point} when the image lies.
    */
   private void draw(Graphics2D g, MapillaryAbstractImage image, ImageIcon icon, Point p) {
@@ -430,5 +428,5 @@
   public void mergeFrom(Layer from) {
     throw new UnsupportedOperationException(
-        "This layer does not support merging yet");
+      "This layer does not support merging yet");
   }
 
@@ -447,5 +445,5 @@
    *
    * @return An array of length 2 containing the two closest images belonging to
-   *         different sequences.
+   * different sequences.
    */
   private MapillaryImage[] getClosestImagesFromDifferentSequences() {
@@ -455,6 +453,6 @@
     MapillaryImage[] ret = new MapillaryImage[2];
     double[] distances = {
-        SEQUENCE_MAX_JUMP_DISTANCE,
-        SEQUENCE_MAX_JUMP_DISTANCE
+      SEQUENCE_MAX_JUMP_DISTANCE,
+      SEQUENCE_MAX_JUMP_DISTANCE
     };
     LatLon selectedCoords = this.data.getSelectedImage().getMovingLatLon();
@@ -466,15 +464,15 @@
       MapillaryImage image = (MapillaryImage) imagePrev;
       if (image.getMovingLatLon().greatCircleDistance(selectedCoords) < SEQUENCE_MAX_JUMP_DISTANCE
-          && selected.getSequence() != image.getSequence()) {
+        && selected.getSequence() != image.getSequence()) {
         if (
-            ret[0] == null && ret[1] == null
+          ret[0] == null && ret[1] == null
             || image.getMovingLatLon().greatCircleDistance(selectedCoords) < distances[0]
             && (ret[1] == null || image.getSequence() != ret[1].getSequence())
-        ) {
+          ) {
           ret[0] = image;
           distances[0] = image.getMovingLatLon().greatCircleDistance(selectedCoords);
         } else if ((ret[1] == null || image.getMovingLatLon().greatCircleDistance(
-            selectedCoords) < distances[1])
-            && image.getSequence() != ret[0].getSequence()) {
+          selectedCoords) < distances[1])
+          && image.getSequence() != ret[0].getSequence()) {
           ret[1] = image;
           distances[1] = image.getMovingLatLon().greatCircleDistance(selectedCoords);
@@ -492,12 +490,10 @@
   @Override
   public Object getInfoComponent() {
-    return new StringBuilder(35)
-      .append(tr("Mapillary layer"))
-      .append('\n')
-      .append(tr("Total images:"))
-      .append(' ')
-      .append(this.data.size())
-      .append('\n')
-      .toString();
+    return tr("Mapillary layer") +
+      '\n' +
+      tr("Total images:") +
+      ' ' +
+      this.data.size() +
+      '\n';
   }
 
@@ -574,5 +570,4 @@
    *
    * @author nokutu
-   *
    */
   private static class DelayedDownload extends Thread {
@@ -593,5 +588,4 @@
    *
    * @author nokutu
-   *
    */
   private class DeleteImageAction extends AbstractAction {
@@ -603,5 +597,5 @@
       if (instance != null)
         MapillaryRecord.getInstance().addCommand(
-            new CommandDelete(getData().getMultiSelectedImages()));
+          new CommandDelete(getData().getMultiSelectedImages()));
     }
   }
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLocationChangeset.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLocationChangeset.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLocationChangeset.java	(revision 32979)
@@ -21,7 +21,5 @@
 
   private void fireListeners() {
-    for (MapillaryChangesetListener listener : listeners) {
-      listener.changesetChanged();
-    }
+    listeners.forEach(MapillaryChangesetListener::changesetChanged);
   }
 
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillarySign.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillarySign.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillarySign.java	(revision 32979)
@@ -1,16 +1,17 @@
 package org.openstreetmap.josm.plugins.mapillary;
-
-import org.openstreetmap.josm.Main;
 
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
-import java.nio.charset.Charset;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Optional;
 
+import org.openstreetmap.josm.Main;
+
 /**
- * Created by nokutu on 30/07/16.
+ * Each {@link MapillarySign} represents a traffic sign detected by the Mapillary's system.
+ *
+ * @author nokutu
  */
 public class MapillarySign {
@@ -33,5 +34,5 @@
         BufferedReader br = new BufferedReader(new InputStreamReader(
           MapillarySign.class.getResourceAsStream("/data/signs/" + country + ".cson"), "UTF-8"
-        ));
+        ))
       ) {
         String line = "";
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryExportAction.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryExportAction.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryExportAction.java	(revision 32979)
@@ -79,5 +79,5 @@
           if (image instanceof MapillaryImage) {
             if (!images.contains(image)) {
-              images.addAll(((MapillaryImage) image).getSequence().getImages());
+              images.addAll(image.getSequence().getImages());
             }
           } else {
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/WalkThread.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/WalkThread.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/WalkThread.java	(revision 32979)
@@ -148,5 +148,5 @@
       this.interrupt();
     } else {
-      SwingUtilities.invokeLater(() -> stopWalk());
+      SwingUtilities.invokeLater(this::stopWalk);
     }
   }
@@ -161,5 +161,5 @@
       MapillaryMainDialog.getInstance().setMode(MapillaryMainDialog.MODE.NORMAL);
     } else {
-      SwingUtilities.invokeLater(() -> end());
+      SwingUtilities.invokeLater(this::end);
     }
   }
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/cache/CacheUtils.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/cache/CacheUtils.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/cache/CacheUtils.java	(revision 32979)
@@ -27,5 +27,5 @@
     FULL_IMAGE,
     /** Both of them */
-    BOTH;
+    BOTH
   }
 
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/cache/MapillaryCache.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/cache/MapillaryCache.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/cache/MapillaryCache.java	(revision 32979)
@@ -44,5 +44,5 @@
    */
   public MapillaryCache(String key, Type type) {
-    super(MapillaryPlugin.getCache(), 50000, 50000, new HashMap<String, String>());
+    super(MapillaryPlugin.getCache(), 50000, 50000, new HashMap<>());
     String k = null;
     URL u = null;
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/HyperlinkLabel.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/HyperlinkLabel.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/HyperlinkLabel.java	(revision 32979)
@@ -112,30 +112,17 @@
     LinkPopUp(final String key) {
       this.copy = new JMenuItem(tr("Copy key"));
-      this.copy.addActionListener(new ActionListener() {
-        @Override
-        public void actionPerformed(ActionEvent paramActionEvent) {
-          Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(key), null);
-        }
-      });
+      this.copy.addActionListener(paramActionEvent -> Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(key), null));
       add(this.copy);
 
       this.copyTag = new JMenuItem(tr("Copy key tag"));
-      this.copyTag.addActionListener(new ActionListener() {
-        @Override
-        public void actionPerformed(ActionEvent paramActionEvent) {
-          Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection("mapillary=" + key), null);
-        }
-      });
+      this.copyTag.addActionListener(paramActionEvent -> Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection("mapillary=" + key), null));
       add(this.copyTag);
 
       this.edit = new JMenuItem(tr("Edit on website"));
-      this.edit.addActionListener(new ActionListener() {
-        @Override
-        public void actionPerformed(ActionEvent paramActionEvent) {
-          try {
-            MapillaryUtils.browse(MapillaryURL.browseEditURL(key));
-          } catch (IOException e) {
-            Main.error(e);
-          }
+      this.edit.addActionListener(paramActionEvent -> {
+        try {
+          MapillaryUtils.browse(MapillaryURL.browseEditURL(key));
+        } catch (IOException e) {
+          Main.error(e);
         }
       });
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryChangesetDialog.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryChangesetDialog.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryChangesetDialog.java	(revision 32979)
@@ -10,5 +10,5 @@
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
-import java.util.Arrays;
+import java.util.Collections;
 import java.util.concurrent.ConcurrentHashMap;
 
@@ -97,5 +97,5 @@
     this.submitButton = new SideButton(new SubmitAction());
 
-    createLayout(treesPanel, true, Arrays.asList(new SideButton[] { this.submitButton }));
+    createLayout(treesPanel, true, Collections.singletonList(this.submitButton));
     buildTree();
   }
@@ -124,11 +124,9 @@
 
     this.map.clear();
-    for (MapillaryImage command : changeset) {
-      if (command != null) {
-        DefaultMutableTreeNode node = new DefaultMutableTreeNode(command.toString());
-        this.map.put(node, command);
-        changesetRoot.add(node);
-      }
-    }
+    changeset.parallelStream().filter(command -> command != null).forEach(command -> {
+      DefaultMutableTreeNode node = new DefaultMutableTreeNode(command.toString());
+      this.map.put(node, command);
+      changesetRoot.add(node);
+    });
 
     this.spacer.setVisible(changeset.isEmpty());
@@ -140,5 +138,5 @@
   public void changesetChanged() {
     if (!SwingUtilities.isEventDispatchThread()) {
-      SwingUtilities.invokeLater(() -> buildTree());
+      SwingUtilities.invokeLater(this::buildTree);
     } else {
       buildTree();
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryExportDialog.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryExportDialog.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryExportDialog.java	(revision 32979)
@@ -83,5 +83,5 @@
     // Some options are disabled depending on the circumstances
     if (!(MapillaryLayer.getInstance().getData().getSelectedImage() instanceof MapillaryImage)
-        || ((MapillaryImage) MapillaryLayer.getInstance().getData().getSelectedImage()).getSequence() == null
+        || MapillaryLayer.getInstance().getData().getSelectedImage().getSequence() == null
     ) {
       this.sequence.setEnabled(false);
@@ -90,10 +90,5 @@
       this.selected.setEnabled(false);
     }
-    this.rewrite.setEnabled(false);
-    for (MapillaryAbstractImage img : MapillaryLayer.getInstance().getData().getImages()) {
-      if (img instanceof MapillaryImportedImage) {
-        this.rewrite.setEnabled(true);
-      }
-    }
+    this.rewrite.setEnabled(MapillaryLayer.getInstance().getData().getImages().parallelStream().anyMatch(img -> img instanceof MapillaryImportedImage));
 
     this.path = new JLabel(tr("Select a folder"));
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryFilterDialog.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryFilterDialog.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryFilterDialog.java	(revision 32979)
@@ -51,4 +51,10 @@
 
   private static final String[] TIME_LIST = {tr("All"), tr("Years"), tr("Months"), tr("Days")};
+
+  private final static long[] TIME_FACTOR = new long[]{
+    31_536_000_000L, // = 365 * 24 * 60 * 60 * 1000 = number of ms in a year
+    2_592_000_000L, // = 30 * 24 * 60 * 60 * 1000 = number of ms in a month
+    86_400_000 // = 24 * 60 * 60 * 1000 = number of ms in a day
+  };
 
   /**
@@ -136,5 +142,5 @@
     panel.add(signChooserPanel, c);
 
-    createLayout(panel, true, Arrays.asList(new SideButton[]{updateButton, resetButton}));
+    createLayout(panel, true, Arrays.asList(updateButton, resetButton));
   }
 
@@ -197,13 +203,7 @@
   private boolean checkValidTime(MapillaryAbstractImage img) {
     Long currentTime = currentTime();
-    long[] timeFactor = new long[]{
-      31_536_000_000L, // = 365 * 24 * 60 * 60 * 1000 = number of ms in a year
-      2_592_000_000L, // = 30 * 24 * 60 * 60 * 1000 = number of ms in a month
-      86_400_000 // = 24 * 60 * 60 * 1000 = number of ms in a day
-    };
     for (int i = 1; i <= 3; i++) {
-      if (TIME_LIST[i].equals(time.getSelectedItem())
-        && img.getCapturedAt() < currentTime - ((Integer) spinner.getValue()).longValue() * timeFactor[i - 1]
-        ) {
+      if (TIME_LIST[i].equals(time.getSelectedItem()) &&
+        img.getCapturedAt() < currentTime - ((Integer) spinner.getValue()).longValue() * TIME_FACTOR[i - 1]) {
         return true;
       }
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryHistoryDialog.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryHistoryDialog.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryHistoryDialog.java	(revision 32979)
@@ -112,5 +112,5 @@
     this.redoButton = new SideButton(new RedoAction());
 
-    createLayout(treesPanel, true, Arrays.asList(new SideButton[] {this.undoButton, this.redoButton}));
+    createLayout(treesPanel, true, Arrays.asList(this.undoButton, this.redoButton));
   }
 
@@ -148,18 +148,14 @@
 
     this.map.clear();
-    for (MapillaryCommand command : undoCommands) {
-      if (command != null) {
-        DefaultMutableTreeNode node = new DefaultMutableTreeNode(command.toString());
-        this.map.put(node, command);
-        undoRoot.add(node);
-      }
-    }
-    for (MapillaryCommand command : redoCommands) {
-      if (command != null) {
-        DefaultMutableTreeNode node = new DefaultMutableTreeNode(command.toString());
-        this.map.put(node, command);
-        redoRoot.add(node);
-      }
-    }
+    undoCommands.stream().filter(command -> command != null).forEach(command -> {
+      DefaultMutableTreeNode node = new DefaultMutableTreeNode(command.toString());
+      this.map.put(node, command);
+      undoRoot.add(node);
+    });
+    redoCommands.stream().filter(command -> command != null).forEach(command -> {
+      DefaultMutableTreeNode node = new DefaultMutableTreeNode(command.toString());
+      this.map.put(node, command);
+      redoRoot.add(node);
+    });
 
     this.separator.setVisible(!undoCommands.isEmpty() || !redoCommands.isEmpty());
@@ -173,5 +169,5 @@
   public void recordChanged() {
     if (!SwingUtilities.isEventDispatchThread()) {
-      SwingUtilities.invokeLater(() -> recordChanged());
+      SwingUtilities.invokeLater(this::recordChanged);
     } else {
       buildTree();
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryMainDialog.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryMainDialog.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryMainDialog.java	(revision 32979)
@@ -84,5 +84,5 @@
      * Mode when in walk.
      */
-    WALK;
+    WALK
   }
 
@@ -149,5 +149,5 @@
         createLayout(
           this.mapillaryImageDisplay,
-          Arrays.asList(new SideButton[]{playButton, pauseButton, stopButton})
+          Arrays.asList(playButton, pauseButton, stopButton)
         );
         break;
@@ -156,5 +156,5 @@
         createLayout(
           this.mapillaryImageDisplay,
-          Arrays.asList(new SideButton[]{blueButton, previousButton, nextButton, redButton})
+          Arrays.asList(blueButton, previousButton, nextButton, redButton)
         );
         break;
@@ -190,5 +190,5 @@
   public synchronized void updateImage(boolean fullQuality) {
     if (!SwingUtilities.isEventDispatchThread()) {
-      SwingUtilities.invokeLater(() -> updateImage());
+      SwingUtilities.invokeLater(this::updateImage);
     } else {
       if (!MapillaryLayer.hasInstance()) {
@@ -293,5 +293,5 @@
   public synchronized void updateTitle() {
     if (!SwingUtilities.isEventDispatchThread()) {
-      SwingUtilities.invokeLater(() -> updateTitle());
+      SwingUtilities.invokeLater(this::updateTitle);
     } else if (this.image != null) {
       StringBuilder title = new StringBuilder(tr(BASE_TITLE));
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryPreferenceSetting.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryPreferenceSetting.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryPreferenceSetting.java	(revision 32979)
@@ -47,4 +47,5 @@
  */
 public class MapillaryPreferenceSetting implements SubPreferenceSetting, MapillaryLoginListener {
+
   private final JComboBox<String> downloadModeComboBox = new JComboBox<>(new String[]{
       DOWNLOAD_MODE.VISIBLE_AREA.getLabel(),
@@ -154,6 +155,4 @@
   @Override
   public boolean ok() {
-    boolean mod = false;
-
     MapillaryPlugin.setMenuEnabled(MapillaryPlugin.getDownloadViewMenu(), false);
     Main.pref.put(
@@ -171,5 +170,7 @@
     Main.pref.put("mapillary.move-to-picture", this.moveTo.isSelected());
     Main.pref.put("mapillary.hover-enabled", this.hoverEnabled.isSelected());
-    return mod;
+
+    //Restart is enver required
+    return false;
   }
 
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/history/MapillaryRecord.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/history/MapillaryRecord.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/history/MapillaryRecord.java	(revision 32979)
@@ -122,8 +122,5 @@
 
   private void fireRecordChanged() {
-    for (MapillaryRecordListener lis : this.listeners) {
-      if (lis != null)
-        lis.recordChanged();
-    }
+    this.listeners.stream().filter(lis -> lis != null).forEach(MapillaryRecordListener::recordChanged);
   }
 
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/download/MapillaryDownloader.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/download/MapillaryDownloader.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/download/MapillaryDownloader.java	(revision 32979)
@@ -2,10 +2,7 @@
 package org.openstreetmap.josm.plugins.mapillary.io.download;
 
-import java.util.ArrayList;
-import java.util.List;
 import java.util.concurrent.ArrayBlockingQueue;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
-import java.util.stream.IntStream;
 
 import javax.swing.JOptionPane;
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/download/MapillaryImageInfoDownloadThread.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/download/MapillaryImageInfoDownloadThread.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/download/MapillaryImageInfoDownloadThread.java	(revision 32979)
@@ -48,5 +48,5 @@
       BufferedReader br = new BufferedReader(new InputStreamReader(
         MapillaryURL.searchImageInfoURL(bounds, page, null).openStream(), "UTF-8"
-      ));
+      ))
     ) {
       try (JsonReader reader = Json.createReader(br)) {
@@ -59,17 +59,13 @@
           data = jsonArr.getJsonObject(i);
           String key = data.getString("key");
-          for (MapillaryAbstractImage image : MapillaryLayer.getInstance().getData().getImages()) {
-            if (
-              image instanceof MapillaryImage
-                && ((MapillaryImage) image).getKey().equals(key)
-                && ((MapillaryImage) image).getUser() == null
-              ) {
-              ((MapillaryImage) image).setUser(data.getString("user"));
-              ((MapillaryImage) image).setCapturedAt(data.getJsonNumber("captured_at").longValue());
-              if (!data.isNull("location")) {
-                ((MapillaryImage) image).setLocation(data.getString("location"));
-              }
+          MapillaryLayer.getInstance().getData().getImages().stream().filter(image -> image instanceof MapillaryImage
+            && ((MapillaryImage) image).getKey().equals(key)
+            && ((MapillaryImage) image).getUser() == null).forEach(image -> {
+            ((MapillaryImage) image).setUser(data.getString("user"));
+            image.setCapturedAt(data.getJsonNumber("captured_at").longValue());
+            if (!data.isNull("location")) {
+              ((MapillaryImage) image).setLocation(data.getString("location"));
             }
-          }
+          });
         }
       }
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/download/MapillarySequenceDownloadThread.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/download/MapillarySequenceDownloadThread.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/download/MapillarySequenceDownloadThread.java	(revision 32979)
@@ -9,4 +9,5 @@
 import java.util.concurrent.ConcurrentSkipListSet;
 import java.util.concurrent.ExecutorService;
+import java.util.stream.Collectors;
 
 import javax.json.Json;
@@ -40,7 +41,7 @@
    * Main constructor.
    *
-   * @param ex     {@link ExecutorService} executing this thread.
+   * @param ex {@link ExecutorService} executing this thread.
    * @param bounds The bounds inside which the sequences should be downloaded
-   * @param page   the pagenumber of the results that should be retrieved
+   * @param page the pagenumber of the results that should be retrieved
    */
   public MapillarySequenceDownloadThread(ExecutorService ex, Bounds bounds, int page) {
@@ -53,7 +54,7 @@
   public void run() {
     try (
-        BufferedReader br = new BufferedReader(new InputStreamReader(
-            MapillaryURL.searchSequenceURL(bounds, page).openStream(), "UTF-8"
-        ));
+      BufferedReader br = new BufferedReader(new InputStreamReader(
+        MapillaryURL.searchSequenceURL(bounds, page).openStream(), "UTF-8"
+      ))
     ) {
       JsonObject jsonall = Json.createReader(br).readObject();
@@ -72,10 +73,10 @@
           try {
             images.add(new MapillaryImage(
-                keys.getString(j),
-                new LatLon(
-                    coords.getJsonArray(j).getJsonNumber(1).doubleValue(),
-                    coords.getJsonArray(j).getJsonNumber(0).doubleValue()
-                ),
-                cas.getJsonNumber(j).doubleValue()));
+              keys.getString(j),
+              new LatLon(
+                coords.getJsonArray(j).getJsonNumber(1).doubleValue(),
+                coords.getJsonArray(j).getJsonNumber(0).doubleValue()
+              ),
+              cas.getJsonNumber(j).doubleValue()));
           } catch (IndexOutOfBoundsException e) {
             Main.warn("Mapillary bug at " + MapillaryURL.searchSequenceURL(bounds, page));
@@ -86,14 +87,12 @@
           break;
         MapillarySequence sequence = new MapillarySequence(
-                jsonobj.getString("key"), jsonobj.getJsonNumber("captured_at")
-                .longValue());
+          jsonobj.getString("key"), jsonobj.getJsonNumber("captured_at")
+          .longValue());
         List<MapillaryImage> finalImages = new ArrayList<>(images);
         // Here it gets only those images which are in the downloaded
         // area.
-        for (MapillaryAbstractImage img : images) {
-          if (!isInside(img))
-            finalImages.remove(img);
-        }
-        synchronized (this.getClass()) {
+        finalImages = images.parallelStream().filter(MapillarySequenceDownloadThread::isInside).collect(Collectors.toList());
+
+        synchronized (MapillarySequenceDownloadThread.class) {
           synchronized (MapillaryAbstractImage.class) {
             for (MapillaryImage img : finalImages) {
@@ -101,9 +100,9 @@
                 // The image in finalImages is substituted by the one in the
                 // database, as they represent the same picture.
-                for (MapillaryAbstractImage source : MapillaryLayer.getInstance().getData().getImages()) {
-                  if (source.equals(img)) {
-                    img = (MapillaryImage) source;
-                  }
-                }
+
+                final MapillaryImage lambdaImg = img;
+                //noinspection OptionalGetWithoutIsPresent
+                img = (MapillaryImage) MapillaryLayer.getInstance().getData().getImages().parallelStream().filter(source -> source.equals(lambdaImg)).findAny().get();
+
                 sequence.add(img);
                 img.setSequence(sequence);
@@ -117,10 +116,10 @@
         }
 
-        MapillaryLayer.getInstance().getData().add(new ConcurrentSkipListSet<MapillaryAbstractImage>(finalImages), false);
+        MapillaryLayer.getInstance().getData().add(new ConcurrentSkipListSet<>(finalImages), false);
       }
     } catch (IOException e) {
       Main.error(String.format(
-          "Error reading the url %s, this might be a Mapillary problem.",
-          MapillaryURL.searchSequenceURL(bounds, page)
+        "Error reading the url %s, this might be a Mapillary problem.",
+        MapillaryURL.searchSequenceURL(bounds, page)
       ), e);
     }
@@ -129,10 +128,5 @@
 
   private static boolean isInside(MapillaryAbstractImage image) {
-    for (Bounds b : MapillaryLayer.getInstance().getData().getBounds()) {
-      if (b.contains(image.getMovingLatLon())) {
-        return true;
-      }
-    }
-    return false;
+    return MapillaryLayer.getInstance().getData().getBounds().parallelStream().anyMatch(b -> b.contains(image.getLatLon()));
   }
 }
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/download/MapillaryTrafficSignDownloadThread.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/download/MapillaryTrafficSignDownloadThread.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/download/MapillaryTrafficSignDownloadThread.java	(revision 32979)
@@ -5,5 +5,4 @@
 import java.io.IOException;
 import java.io.InputStreamReader;
-import java.net.MalformedURLException;
 import java.util.concurrent.ExecutorService;
 
@@ -49,5 +48,5 @@
             BufferedReader br = new BufferedReader(new InputStreamReader(
                     MapillaryURL.searchImageInfoURL(bounds, page, IMAGE_SELECTOR.OBJ_REC_ONLY).openStream(), "UTF-8"
-            ));
+            ))
     ) {
       JsonObject jsonobj = Json.createReader(br).readObject();
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/export/MapillaryExportDownloadThread.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/export/MapillaryExportDownloadThread.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/export/MapillaryExportDownloadThread.java	(revision 32979)
@@ -63,12 +63,10 @@
       CacheEntryAttributes attributes, LoadResult result) {
     try {
-      synchronized (this.getClass()) {
+      synchronized (MapillaryExportDownloadThread.class) {
         this.queue
             .put(ImageIO.read(new ByteArrayInputStream(data.getContent())));
         this.queueImages.put(this.image);
       }
-    } catch (InterruptedException e) {
-      Main.error(e);
-    } catch (IOException e) {
+    } catch (InterruptedException | IOException e) {
       Main.error(e);
     }
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/export/MapillaryExportManager.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/export/MapillaryExportManager.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/export/MapillaryExportManager.java	(revision 32979)
@@ -109,5 +109,5 @@
     }
     this.ex = new ThreadPoolExecutor(20, 35, 25, TimeUnit.SECONDS,
-        new ArrayBlockingQueue<Runnable>(10));
+      new ArrayBlockingQueue<>(10));
     for (MapillaryAbstractImage image : this.images) {
       if (image instanceof MapillaryImage) {
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/export/MapillaryExportWriterThread.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/export/MapillaryExportWriterThread.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/export/MapillaryExportWriterThread.java	(revision 32979)
@@ -129,8 +129,8 @@
         if (mimg instanceof MapillaryImportedImage) {
           exifDirectory.add(ExifTagConstants.EXIF_TAG_DATE_TIME_ORIGINAL,
-              ((MapillaryImportedImage) mimg).getDate("yyyy/MM/dd HH:mm:ss"));
+              mimg.getDate("yyyy/MM/dd HH:mm:ss"));
         } else if (mimg instanceof MapillaryImage) {
           exifDirectory.add(ExifTagConstants.EXIF_TAG_DATE_TIME_ORIGINAL,
-              ((MapillaryImage) mimg).getDate("yyyy/MM/dd HH/mm/ss"));
+              mimg.getDate("yyyy/MM/dd HH/mm/ss"));
         }
         outputSet.setGPSInDegrees(mimg.getMovingLatLon().lon(), mimg.getMovingLatLon().lat());
@@ -142,9 +142,5 @@
         Main.info("Mapillary export cancelled");
         return;
-      } catch (IOException e) {
-        Main.error(e);
-      } catch (ImageWriteException e) {
-        Main.error(e);
-      } catch (ImageReadException e) {
+      } catch (IOException | ImageReadException | ImageWriteException e) {
         Main.error(e);
       }
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/mode/AbstractMode.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/mode/AbstractMode.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/mode/AbstractMode.java	(revision 32979)
@@ -57,8 +57,8 @@
    * Paint the dataset using the engine set.
    *
-   * @param g
+   * @param g {@link Graphics2D} used for painting
    * @param mv
    *          The object that can translate GeoPoints to screen coordinates.
-   * @param box
+   * @param box Area where painting is going to be performed
    */
   public abstract void paint(Graphics2D g, MapView mv, Bounds box);
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/OAuthPortListener.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/OAuthPortListener.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/OAuthPortListener.java	(revision 32979)
@@ -43,9 +43,9 @@
         Socket clientSocket = serverSocket.accept();
         PrintWriter out = new PrintWriter(new OutputStreamWriter(clientSocket.getOutputStream(), "UTF-8"), true);
-        Scanner in = new Scanner(new InputStreamReader(clientSocket.getInputStream(), "UTF-8"));
+        Scanner in = new Scanner(new InputStreamReader(clientSocket.getInputStream(), "UTF-8"))
     ) {
       String s;
       String accessToken = null;
-      while (in.hasNextLine() && accessToken == null) {
+      while (in.hasNextLine()) {
         s = in.nextLine();
         Matcher tokenMatcher = Pattern.compile("^.*&access_token=([^&]+)&.*$").matcher('&'+s+'&');
@@ -76,5 +76,4 @@
     } catch (BindException e) {
       Main.warn(e);
-      return;
     } catch (IOException e) {
       Main.error(e);
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 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/UploadUtils.java	(revision 32979)
@@ -85,5 +85,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<>(15));
       this.delete = delete;
     }
@@ -137,5 +137,5 @@
    * tags.
    *
-   * @param image
+   * @param image The image to be uploaded
    * @return A File object containing the picture and an updated version of the
    * EXIF tags.
@@ -145,5 +145,5 @@
    * @throws ImageWriteException if there are errors writing the image in the file.
    */
-  public static File updateFile(MapillaryImportedImage image)
+  private static File updateFile(MapillaryImportedImage image)
           throws ImageReadException, IOException, ImageWriteException {
     TiffOutputSet outputSet = null;
@@ -153,10 +153,7 @@
 
     // If the image is imported, loads the rest of the EXIF data.
-    JpegImageMetadata jpegMetadata = null;
-    try {
-      ImageMetadata metadata = Imaging.getMetadata(image.getFile());
-      jpegMetadata = (JpegImageMetadata) metadata;
-    } catch (Exception e) {
-    }
+    ImageMetadata metadata = Imaging.getMetadata(image.getFile());
+    JpegImageMetadata jpegMetadata = (JpegImageMetadata) metadata;
+
     if (null != jpegMetadata) {
       final TiffImageMetadata exif = jpegMetadata.getExif();
@@ -204,5 +201,6 @@
    * Uploads the given MapillaryImportedImage object.
    *
-   * @param image
+   * @param image The image to be uploaded
+   * @throws IllegalStateException If {@link MapillaryUser#getSecrets()} returns null
    */
   public static void upload(MapillaryImportedImage image) {
@@ -211,21 +209,25 @@
 
   /**
-   * @param image
+   * @param image The image to be uploaded
    * @param uuid  The UUID used to create the sequence.
    */
   public static void upload(MapillaryImportedImage image, UUID uuid) {
-    String key = new StringBuilder(MapillaryUser.getUsername())
-      .append('/').append(uuid)
-      .append('/').append(image.getMovingLatLon().lat()) // TODO: Make sure, that the double values are not appended as something like "10e-4", "Infinity" or "NaN" (all possible values of Double.toString(double))
-      .append('_').append(image.getMovingLatLon().lon())
-      .append('_').append(image.getMovingCa())
-      .append('_').append(image.getCapturedAt())
-      .append(".jpg")
-      .toString();
+    Map<String, String> secretMap = MapillaryUser.getSecrets();
+    if (secretMap == null) {
+      throw new IllegalStateException("Can't obtain secrents from user");
+    }
+
+    String key = MapillaryUser.getUsername() +
+      '/' + uuid +
+      '/' + image.getMovingLatLon().lat() + // TODO: Make sure, that the double values are not appended as something like "10e-4", "Infinity" or "NaN" (all possible values of Double.toString(double))
+      '_' + image.getMovingLatLon().lon() +
+      '_' + image.getMovingCa() +
+      '_' + image.getCapturedAt() +
+      ".jpg";
 
     String policy;
     String signature;
-    policy = MapillaryUser.getSecrets().get("images_policy");
-    signature = MapillaryUser.getSecrets().get("images_hash");
+    policy = secretMap.get("images_policy");
+    signature = secretMap.get("images_hash");
 
     Map<String, String> hash = new HashMap<>();
@@ -244,10 +246,9 @@
 
   /**
-   * @param file
-   * @param hash
-   * @throws IOException
+   * @param file File that is going to be uploaded
+   * @param hash Information attached to the upload
    * @throws IllegalArgumentException if the hash doesn't contain all the needed keys.
    */
-  public static void uploadFile(File file, Map<String, String> hash) throws IOException {
+  private static void uploadFile(File file, Map<String, String> hash) throws IOException {
     HttpClientBuilder builder = HttpClientBuilder.create();
     HttpPost httpPost = new HttpPost(UPLOAD_URL);
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/traffico/TrafficoSign.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/traffico/TrafficoSign.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/traffico/TrafficoSign.java	(revision 32979)
@@ -109,5 +109,5 @@
       // Create Map for country if not already exists
       if (!signs.containsKey(sign.getCountry())) {
-        signs.put(sign.getCountry(), new TreeMap<String, TrafficoSign>());
+        signs.put(sign.getCountry(), new TreeMap<>());
       }
       // Don't overwrite existing sign with same country-name-combination
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils/MapillaryColorScheme.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils/MapillaryColorScheme.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils/MapillaryColorScheme.java	(revision 32979)
@@ -59,5 +59,5 @@
       }
       ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
-      ((Graphics2D) g).fillRoundRect(0, 0, getWidth(), getHeight(), 3, 3);
+      g.fillRoundRect(0, 0, getWidth(), getHeight(), 3, 3);
       super.paintComponent(g);
     }
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils/MapillaryUtils.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils/MapillaryUtils.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils/MapillaryUtils.java	(revision 32979)
@@ -10,5 +10,4 @@
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Locale;
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 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils/PluginState.java	(revision 32979)
@@ -111,5 +111,5 @@
       dlg.setVisible(true);
     } else {
-      SwingUtilities.invokeLater(() -> finishedUploadDialog());
+      SwingUtilities.invokeLater(PluginState::finishedUploadDialog);
     }
   }
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils/ValidationUtil.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils/ValidationUtil.java	(revision 32978)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils/ValidationUtil.java	(revision 32979)
@@ -56,6 +56,7 @@
    * @param nullAllowed this controls the behaviour when the key is <code>null</code>. If this variable is
    *          <code>false</code>, an {@link IllegalArgumentException} is then thrown, otherwise nothing is done.
-   * @see {@link #validateSequenceKey(String)}
+   * @see #validateSequenceKey(String)
    */
+  @SuppressWarnings ("ConstantConditions")
   public static void throwExceptionForInvalidSeqKey(String seqKey, boolean nullAllowed) {
     if (!validateSequenceKey(seqKey)) {
