Index: /trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java	(revision 8386)
+++ /trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java	(revision 8387)
@@ -244,5 +244,4 @@
         );
 
-        pane.getValue();
         final JDialog dialog = new JDialog(
                 JOptionPane.getFrameForComponent(parentComponent),
Index: /trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 8386)
+++ /trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 8387)
@@ -559,5 +559,8 @@
                             }
                         }
-                    } catch (Exception e) {
+                    } catch (IOException | SecurityException e) {
+                        if (Main.isDebugEnabled()) {
+                            Main.debug("Exception while checking IPv6 connectivity: "+e);
+                        }
                     }
                     if(wasv6 && !hasv6) {
Index: /trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java	(revision 8386)
+++ /trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java	(revision 8387)
@@ -306,21 +306,14 @@
 
         this.bbox = bbox;
-        double minLon = bbox.getMinLon();
-        double maxLon = bbox.getMaxLon();
-
-        if (bbox.crosses180thMeridian()) {
-            minLon -= 360.0;
-        }
-
         iSelectionRectStart = new Coordinate(bbox.getMinLat(), bbox.getMinLon());
         iSelectionRectEnd = new Coordinate(bbox.getMaxLat(), bbox.getMaxLon());
 
         // calc the screen coordinates for the new selection rectangle
-        MapMarkerDot xmin_ymin = new MapMarkerDot(bbox.getMinLat(), bbox.getMinLon());
-        MapMarkerDot xmax_ymax = new MapMarkerDot(bbox.getMaxLat(), bbox.getMaxLon());
+        MapMarkerDot min = new MapMarkerDot(bbox.getMinLat(), bbox.getMinLon());
+        MapMarkerDot max = new MapMarkerDot(bbox.getMaxLat(), bbox.getMaxLon());
 
         List<MapMarker> marker = new ArrayList<>(2);
-        marker.add(xmin_ymin);
-        marker.add(xmax_ymax);
+        marker.add(min);
+        marker.add(max);
         setMapMarkerList(marker);
         setDisplayToFitMapMarkers();
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java	(revision 8386)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java	(revision 8387)
@@ -376,5 +376,4 @@
         public void actionPerformed(ActionEvent e) {
             TreePath path;
-            undoTree.getSelectionPath();
             if (!undoTree.isSelectionEmpty()) {
                 path = undoTree.getSelectionPath();
@@ -386,5 +385,5 @@
             OsmDataLayer editLayer = Main.main.getEditLayer();
             if (editLayer == null) return;
-            editLayer.data.setSelected( getAffectedPrimitives(path));
+            editLayer.data.setSelected(getAffectedPrimitives(path));
         }
 
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesCellRenderer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesCellRenderer.java	(revision 8386)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesCellRenderer.java	(revision 8387)
@@ -10,4 +10,5 @@
 import java.awt.Font;
 import java.util.Map;
+import java.util.Objects;
 
 import javax.swing.JLabel;
@@ -65,5 +66,5 @@
                     if (otherCount == 1) {
                         for (Map.Entry<?, ?> entry : v.entrySet()) { // Find the non-blank value in the map
-                            if ( entry.getKey() != "") {
+                            if (!Objects.equals(entry.getKey(), "")) {
                                 /* I18n: properties display partial string joined with comma, frst is count, second is value */
                                 sb.append(tr("{0} ''{1}''", entry.getValue().toString(), entry.getKey()));
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java	(revision 8386)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java	(revision 8387)
@@ -124,5 +124,4 @@
      */
     public static void notifyDownloadResults(final Component parent, PluginDownloadTask task, boolean restartRequired) {
-        final Collection<PluginInformation> downloaded = task.getDownloadedPlugins();
         final Collection<PluginInformation> failed = task.getFailedPlugins();
         final StringBuilder sb = new StringBuilder();
Index: /trunk/src/org/openstreetmap/josm/gui/progress/PleaseWaitProgressMonitor.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/progress/PleaseWaitProgressMonitor.java	(revision 8386)
+++ /trunk/src/org/openstreetmap/josm/gui/progress/PleaseWaitProgressMonitor.java	(revision 8387)
@@ -3,7 +3,4 @@
 
 import java.awt.Component;
-import java.awt.Dialog;
-import java.awt.Frame;
-import java.awt.Window;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
@@ -35,5 +32,5 @@
 
     public static final int PROGRESS_BAR_MAX = 10000;
-    private final Window dialogParent;
+    private final Component dialogParent;
 
     private int currentProgressValue = 0;
@@ -154,10 +151,8 @@
             public void run() {
                 Main.currentProgressMonitor = PleaseWaitProgressMonitor.this;
-                if (dialogParent instanceof Frame && dialog == null) {
-                    dialog = new PleaseWaitDialog(dialogParent);
-                } else if (dialogParent instanceof Dialog && dialog == null) {
+                if (dialogParent != null && dialog == null) {
                     dialog = new PleaseWaitDialog(dialogParent);
                 } else
-                    throw new ProgressException("PleaseWaitDialog parent must be either Frame or Dialog");
+                    throw new ProgressException("PleaseWaitDialog parent must be set");
 
                 if (windowTitle != null) {
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionItemPriority.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionItemPriority.java	(revision 8386)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionItemPriority.java	(revision 8387)
@@ -88,5 +88,5 @@
     @Override
     public int compareTo(AutoCompletionItemPriority other) {
-        int ui = -Integer.compare(userInput, other.userInput);
+        int ui = Integer.compare(other.userInput, userInput);
         if (ui != 0) return ui;
 
Index: /trunk/src/org/openstreetmap/josm/io/CachedFile.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 8386)
+++ /trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 8387)
@@ -468,11 +468,7 @@
         checkOfflineAccess(downloadString);
 
-        HttpURLConnection con = null;
         int numRedirects = 0;
         while(true) {
-            con = Utils.openHttpConnection(downloadUrl);
-            if (con == null) {
-                throw new IOException("Cannot open http connection to "+downloadString);
-            }
+            HttpURLConnection con = Utils.openHttpConnection(downloadUrl);
             if (ifModifiedSince != null) {
                 con.setIfModifiedSince(ifModifiedSince);
Index: /trunk/src/org/openstreetmap/josm/io/InvalidXmlCharacterFilter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/InvalidXmlCharacterFilter.java	(revision 8386)
+++ /trunk/src/org/openstreetmap/josm/io/InvalidXmlCharacterFilter.java	(revision 8387)
@@ -62,5 +62,5 @@
 
     private char filter(char in) {
-        if (in < 0x20 && in >= 0 && INVALID_CHARS[in]) {
+        if (in < 0x20 && INVALID_CHARS[in]) {
             if (firstWarning) {
                 Main.warn("Invalid xml character encountered: '"+in+"'.");
Index: /trunk/src/org/openstreetmap/josm/tools/Geometry.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/Geometry.java	(revision 8386)
+++ /trunk/src/org/openstreetmap/josm/tools/Geometry.java	(revision 8387)
@@ -631,6 +631,4 @@
         for (Node n : way.getNodes()) {
             if (lastN != null) {
-                n.getEastNorth().getX();
-
                 area += (calcX(n) * calcY(lastN)) - (calcY(n) * calcX(lastN));
             }
Index: /trunk/src/org/openstreetmap/josm/tools/ImageOverlay.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/ImageOverlay.java	(revision 8386)
+++ /trunk/src/org/openstreetmap/josm/tools/ImageOverlay.java	(revision 8387)
@@ -84,12 +84,12 @@
         int x, y;
         if (width == -1 && offsetLeft < 0) {
-            x = new Double(w*offsetRight).intValue() - overlay.getIconWidth();
+            x = (int)(w*offsetRight) - overlay.getIconWidth();
         } else {
-            x = new Double(w*offsetLeft).intValue();
+            x = (int)(w*offsetLeft);
         }
         if (height == -1 && offsetTop < 0) {
-            y = new Double(h*offsetBottom).intValue() - overlay.getIconHeight();
+            y = (int)(h*offsetBottom) - overlay.getIconHeight();
         } else {
-            y = new Double(h*offsetTop).intValue();
+            y = (int)(h*offsetTop);
         }
         overlay.paintIcon(null, ground.getGraphics(), x, y);
