Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportAction.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportAction.java	(revision 31836)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportAction.java	(revision 31837)
@@ -35,6 +35,4 @@
   private static final long serialVersionUID = 4995924098228081806L;
 
-  private JFileChooser chooser;
-
   /**
    * Main constructor.
@@ -51,17 +49,16 @@
   @Override
   public void actionPerformed(ActionEvent e) {
-    this.chooser = new JFileChooser();
+    JFileChooser chooser = new JFileChooser();
     File startDirectory = new File(Main.pref.get("mapillary.start-directory",
         System.getProperty("user.home")));
-    this.chooser.setCurrentDirectory(startDirectory);
-    this.chooser.setDialogTitle(tr("Select pictures"));
-    this.chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
-    this.chooser.setAcceptAllFileFilterUsed(false);
-    this.chooser.addChoosableFileFilter(new FileNameExtensionFilter("images", "jpg", "jpeg", "png"));
-    this.chooser.setMultiSelectionEnabled(true);
-    if (this.chooser.showOpenDialog(Main.parent) == JFileChooser.APPROVE_OPTION) {
+    chooser.setCurrentDirectory(startDirectory);
+    chooser.setDialogTitle(tr("Select pictures"));
+    chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
+    chooser.setAcceptAllFileFilterUsed(false);
+    chooser.addChoosableFileFilter(new FileNameExtensionFilter("images", "jpg", "jpeg", "png"));
+    chooser.setMultiSelectionEnabled(true);
+    if (chooser.showOpenDialog(Main.parent) == JFileChooser.APPROVE_OPTION) {
       List<MapillaryAbstractImage> images = new ArrayList<>();
-      for (int i = 0; i < this.chooser.getSelectedFiles().length; i++) {
-        File file = this.chooser.getSelectedFiles()[i];
+      for (File file : chooser.getSelectedFiles()) {
         Main.pref.put("mapillary.start-directory", file.getParent());
         MapillaryLayer.getInstance();
@@ -69,11 +66,11 @@
           if (file.listFiles() == null)
             continue;
-          for (int j = 0; j < file.listFiles().length; j++) {
-            String extension = MapillaryUtils.getExtension(file.listFiles()[j]);
+          for (File innerFile : file.listFiles()) {
+            String extension = MapillaryUtils.getExtension(innerFile);
             try {
               if ("jpg".equals(extension) || "jpeg".equals(extension))
-                images.add(MapillaryUtils.readJPG(file.listFiles()[j]));
+                images.add(MapillaryUtils.readJPG(innerFile));
               else if ("png".equals(extension))
-                images.add(MapillaryUtils.readPNG(file.listFiles()[j]));
+                images.add(MapillaryUtils.readPNG(innerFile));
             } catch (ImageReadException | IOException | NullPointerException e1) {
               Main.error(e1);
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportIntoSequenceAction.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportIntoSequenceAction.java	(revision 31836)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportIntoSequenceAction.java	(revision 31837)
@@ -38,6 +38,4 @@
   private static final long serialVersionUID = -9190217809965894878L;
 
-  private JFileChooser chooser;
-
   private List<MapillaryAbstractImage> images;
 
@@ -59,18 +57,16 @@
     this.images = new LinkedList<>();
 
-    this.chooser = new JFileChooser();
+    JFileChooser chooser = new JFileChooser();
     File startDirectory = new File(Main.pref.get("mapillary.start-directory",
         System.getProperty("user.home")));
-    this.chooser.setCurrentDirectory(startDirectory);
-    this.chooser.setDialogTitle(tr("Select pictures"));
-    this.chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
-    this.chooser.setAcceptAllFileFilterUsed(false);
-    this.chooser.addChoosableFileFilter(new FileNameExtensionFilter("images",
-        "jpg", "jpeg"));
-    this.chooser.setMultiSelectionEnabled(true);
+    chooser.setCurrentDirectory(startDirectory);
+    chooser.setDialogTitle(tr("Select pictures"));
+    chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
+    chooser.setAcceptAllFileFilterUsed(false);
+    chooser.addChoosableFileFilter(new FileNameExtensionFilter("images", "jpg", "jpeg"));
+    chooser.setMultiSelectionEnabled(true);
 
-    if (this.chooser.showOpenDialog(Main.parent) == JFileChooser.APPROVE_OPTION) {
-      for (int i = 0; i < this.chooser.getSelectedFiles().length; i++) {
-        File file = this.chooser.getSelectedFiles()[i];
+    if (chooser.showOpenDialog(Main.parent) == JFileChooser.APPROVE_OPTION) {
+      for (File file : chooser.getSelectedFiles()) {
         if (file == null)
           break;
@@ -78,9 +74,9 @@
         MapillaryLayer.getInstance();
         if (file.isDirectory()) {
-          for (int j = 0; j < file.listFiles().length; j++) {
-            String extension = MapillaryUtils.getExtension(file.listFiles()[j]);
+          for (File file2 : file.listFiles()) {
+            String extension = MapillaryUtils.getExtension(file2);
             try {
               if ("jpg".equals(extension) || "jpeg".equals(extension))
-                MapillaryUtils.readJPG(file.listFiles()[j], true);
+                MapillaryUtils.readJPG(file2, true);
             } catch (ImageReadException | NullPointerException | IOException e) {
               Main.error(e);
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 31836)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryFilterDialog.java	(revision 31837)
@@ -47,6 +47,4 @@
 
   private static final String[] TIME_LIST = { tr("All"), tr("Years"), tr("Months"), tr("Days") };
-
-  private final JPanel panel;
 
   /** Spinner to choose the range of dates. */
@@ -90,6 +88,4 @@
             KeyEvent.VK_M, Shortcut.NONE), 200);
 
-    this.panel = new JPanel();
-
     this.signChooser.setEnabled(false);
     JPanel signChooserPanel = new JPanel();
@@ -115,19 +111,19 @@
     this.downloaded.setSelected(true);
 
+    JPanel panel = new JPanel();
     JPanel col1 = new JPanel(new GridLayout(2, 1));
     col1.add(this.downloaded);
     col1.add(fromPanel);
-    this.panel.add(col1);
+    panel.add(col1);
     JPanel col2 = new JPanel(new GridLayout(2, 1));
     col2.add(this.imported);
     col2.add(userSearchPanel);
-    this.panel.add(col2);
+    panel.add(col2);
     JPanel col3 = new JPanel(new GridLayout(2, 1));
     col3.add(this.onlySigns);
     col3.add(signChooserPanel);
-    this.panel.add(col3);
-
-    createLayout(this.panel, true,
-        Arrays.asList(new SideButton[] { this.updateButton, this.resetButton }));
+    panel.add(col3);
+
+    createLayout(panel, true, Arrays.asList(new SideButton[] { updateButton, resetButton }));
   }
 
@@ -203,7 +199,7 @@
       Long currentTime = currentTime();
       long[] timeFactor = new long[]{
-          31536000000L, // = 365 * 24 * 60 * 60 * 1000 = number of ms in a year
-          2592000000L, // = 30 * 24 * 60 * 60 * 1000 = number of ms in a month
-          86400000 // = 24 * 60 * 60 * 1000 = number of ms in a day
+          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++) {
@@ -235,6 +231,5 @@
   }
 
-  private static boolean checkSign(MapillaryImage img, JCheckBox signCheckBox,
-      String singString) {
+  private static boolean checkSign(MapillaryImage img, JCheckBox signCheckBox, String singString) {
     boolean contains = false;
     for (String sign : img.getSigns()) {
@@ -242,7 +237,5 @@
         contains = true;
     }
-    if (contains == signCheckBox.isSelected() && contains)
-      return true;
-    return false;
+    return contains == signCheckBox.isSelected() && contains;
   }
 
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 31836)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/download/MapillarySequenceDownloadThread.java	(revision 31837)
@@ -122,7 +122,9 @@
 
   private boolean isInside(MapillaryAbstractImage image) {
-    for (int i = 0; i < MapillaryLayer.getInstance().getData().bounds.size(); i++)
-      if (MapillaryLayer.getInstance().getData().bounds.get(i).contains(image.getLatLon()))
+    for (Bounds b : MapillaryLayer.getInstance().getData().bounds) {
+      if (b.contains(image.getLatLon())) {
         return true;
+      }
+    }
     return false;
   }
