Index: /trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java	(revision 6246)
@@ -132,5 +132,5 @@
             if(selectedWays.size() == 1) {
                 w = selectedWays.iterator().next();
-                if(w.containsNode(n) == false)
+                if (!w.containsNode(n))
                     // warning
                     return;
Index: /trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java	(revision 6246)
@@ -8,5 +8,7 @@
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
+import java.util.Arrays;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
@@ -38,5 +40,5 @@
 public class AutoScaleAction extends JosmAction {
 
-    public static final String[] MODES = {
+    public static final Collection<String> MODES = Collections.unmodifiableList(Arrays.asList(
         marktr("data"),
         marktr("layer"),
@@ -46,5 +48,5 @@
         marktr("problem"),
         marktr("previous"),
-        marktr("next")};
+        marktr("next")));
 
     private final String mode;
Index: /trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java	(revision 6246)
@@ -63,7 +63,5 @@
     public static class JoinAreasResult {
 
-        public boolean mergeSuccessful;
         public boolean hasChanges;
-        public boolean hasRelationProblems;
 
         public List<Multipolygon> polygons;
@@ -539,5 +537,4 @@
 
         result.hasChanges = true;
-        result.mergeSuccessful = true;
         result.polygons = polygons;
         return result;
Index: /trunk/src/org/openstreetmap/josm/actions/JumpToAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/JumpToAction.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/actions/JumpToAction.java	(revision 6246)
@@ -64,5 +64,5 @@
                   BorderLayout.NORTH);
 
-        class osmURLListener implements DocumentListener {
+        class OsmURLListener implements DocumentListener {
             @Override public void changedUpdate(DocumentEvent e) { parseURL(); }
             @Override public void insertUpdate(DocumentEvent e) { parseURL(); }
@@ -70,5 +70,5 @@
         }
 
-        class osmLonLatListener implements DocumentListener {
+        class OsmLonLatListener implements DocumentListener {
             @Override public void changedUpdate(DocumentEvent e) { updateUrl(false); }
             @Override public void insertUpdate(DocumentEvent e) { updateUrl(false); }
@@ -76,9 +76,9 @@
         }
 
-        osmLonLatListener x=new osmLonLatListener();
+        OsmLonLatListener x = new OsmLonLatListener();
         lat.getDocument().addDocumentListener(x);
         lon.getDocument().addDocumentListener(x);
         zm.getDocument().addDocumentListener(x);
-        url.getDocument().addDocumentListener(new osmURLListener());
+        url.getDocument().addDocumentListener(new OsmURLListener());
 
         JPanel p = new JPanel(new GridBagLayout());
Index: /trunk/src/org/openstreetmap/josm/actions/MapRectifierWMSmenuAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/MapRectifierWMSmenuAction.java	(revision 6246)
+++ /trunk/src/org/openstreetmap/josm/actions/MapRectifierWMSmenuAction.java	(revision 6246)
@@ -0,0 +1,226 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.actions;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.KeyEvent;
+import java.util.ArrayList;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.swing.ButtonGroup;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.imagery.ImageryInfo;
+import org.openstreetmap.josm.gui.ExtendedDialog;
+import org.openstreetmap.josm.gui.layer.WMSLayer;
+import org.openstreetmap.josm.tools.GBC;
+import org.openstreetmap.josm.tools.Shortcut;
+import org.openstreetmap.josm.tools.UrlLabel;
+import org.openstreetmap.josm.tools.Utils;
+import org.openstreetmap.josm.gui.widgets.JosmTextField;
+
+public class MapRectifierWMSmenuAction extends JosmAction {
+    /**
+     * Class that bundles all required information of a rectifier service
+     */
+    public static class RectifierService {
+        private final String name;
+        private final String url;
+        private final String wmsUrl;
+        private final Pattern urlRegEx;
+        private final Pattern idValidator;
+        public JRadioButton btn;
+
+        /**
+         * @param name Name of the rectifing service
+         * @param url URL to the service where users can register, upload, etc.
+         * @param wmsUrl URL to the WMS server where JOSM will grab the images. Insert __s__ where the ID should be placed
+         * @param urlRegEx a regular expression that determines if a given URL is one of the service and returns the WMS id if so
+         * @param idValidator regular expression that checks if a given ID is syntactically valid
+         */
+        public RectifierService(String name, String url, String wmsUrl, String urlRegEx, String idValidator) {
+            this.name = name;
+            this.url = url;
+            this.wmsUrl = wmsUrl;
+            this.urlRegEx = Pattern.compile(urlRegEx);
+            this.idValidator = Pattern.compile(idValidator);
+        }
+
+        public boolean isSelected() {
+            return btn.isSelected();
+        }
+    }
+
+    /**
+     * List of available rectifier services. May be extended from the outside
+     */
+    public ArrayList<RectifierService> services = new ArrayList<RectifierService>();
+
+    public MapRectifierWMSmenuAction() {
+        super(tr("Rectified Image..."),
+                "OLmarker",
+                tr("Download Rectified Images From Various Services"),
+                Shortcut.registerShortcut("imagery:rectimg",
+                        tr("Imagery: {0}", tr("Rectified Image...")),
+                        KeyEvent.CHAR_UNDEFINED, Shortcut.NONE),
+                true
+        );
+
+        // Add default services
+        services.add(
+                new RectifierService("Metacarta Map Rectifier",
+                        "http://labs.metacarta.com/rectifier/",
+                        "http://labs.metacarta.com/rectifier/wms.cgi?id=__s__&srs=EPSG:4326"
+                        + "&Service=WMS&Version=1.1.0&Request=GetMap&format=image/png&",
+                        // This matches more than the "classic" WMS link, so users can pretty much
+                        // copy any link as long as it includes the ID
+                        "labs\\.metacarta\\.com/(?:.*?)(?:/|=)([0-9]+)(?:\\?|/|\\.|$)",
+                "^[0-9]+$")
+        );
+        services.add(
+                new RectifierService("Map Warper",
+                        "http://mapwarper.net/",
+                        "http://mapwarper.net/maps/wms/__s__?request=GetMap&version=1.1.1"
+                        + "&styles=&format=image/png&srs=epsg:4326&exceptions=application/vnd.ogc.se_inimage&",
+                        // This matches more than the "classic" WMS link, so users can pretty much
+                        // copy any link as long as it includes the ID
+                        "(?:mapwarper\\.net|warper\\.geothings\\.net)/(?:.*?)/([0-9]+)(?:\\?|/|\\.|$)",
+                "^[0-9]+$")
+        );
+
+        // This service serves the purpose of "just this once" without forcing the user
+        // to commit the link to the preferences
+
+        // Clipboard content gets trimmed, so matching whitespace only ensures that this
+        // service will never be selected automatically.
+        services.add(new RectifierService(tr("Custom WMS Link"), "", "", "^\\s+$", ""));
+    }
+
+    @Override
+    public void actionPerformed(ActionEvent e) {
+        if (!isEnabled()) return;
+        JPanel panel = new JPanel(new GridBagLayout());
+        panel.add(new JLabel(tr("Supported Rectifier Services:")), GBC.eol());
+
+        JosmTextField tfWmsUrl = new JosmTextField(30);
+
+        String clip = Utils.getClipboardContent();
+        clip = clip == null ? "" : clip.trim();
+        ButtonGroup group = new ButtonGroup();
+
+        JRadioButton firstBtn = null;
+        for(RectifierService s : services) {
+            JRadioButton serviceBtn = new JRadioButton(s.name);
+            if(firstBtn == null) {
+                firstBtn = serviceBtn;
+            }
+            // Checks clipboard contents against current service if no match has been found yet.
+            // If the contents match, they will be inserted into the text field and the corresponding
+            // service will be pre-selected.
+            if(!clip.isEmpty() && tfWmsUrl.getText().isEmpty()
+                    && (s.urlRegEx.matcher(clip).find() || s.idValidator.matcher(clip).matches())) {
+                serviceBtn.setSelected(true);
+                tfWmsUrl.setText(clip);
+            }
+            s.btn = serviceBtn;
+            group.add(serviceBtn);
+            if(!s.url.isEmpty()) {
+                panel.add(serviceBtn, GBC.std());
+                panel.add(new UrlLabel(s.url, tr("Visit Homepage")), GBC.eol().anchor(GridBagConstraints.EAST));
+            } else {
+                panel.add(serviceBtn, GBC.eol().anchor(GridBagConstraints.WEST));
+            }
+        }
+
+        // Fallback in case no match was found
+        if(tfWmsUrl.getText().isEmpty() && firstBtn != null) {
+            firstBtn.setSelected(true);
+        }
+
+        panel.add(new JLabel(tr("WMS URL or Image ID:")), GBC.eol());
+        panel.add(tfWmsUrl, GBC.eol().fill(GridBagConstraints.HORIZONTAL));
+
+        ExtendedDialog diag = new ExtendedDialog(Main.parent,
+                tr("Add Rectified Image"),
+
+                new String[] {tr("Add Rectified Image"), tr("Cancel")});
+        diag.setContent(panel);
+        diag.setButtonIcons(new String[] {"OLmarker.png", "cancel.png"});
+
+        // This repeatedly shows the dialog in case there has been an error.
+        // The loop is break;-ed if the users cancels
+        outer: while(true) {
+            diag.showDialog();
+            int answer = diag.getValue();
+            // Break loop when the user cancels
+            if(answer != 1) {
+                break;
+            }
+
+            String text = tfWmsUrl.getText().trim();
+            // Loop all services until we find the selected one
+            for(RectifierService s : services) {
+                if(!s.isSelected()) {
+                    continue;
+                }
+
+                // We've reached the custom WMS URL service
+                // Just set the URL and hope everything works out
+                if(s.wmsUrl.isEmpty()) {
+                    addWMSLayer(s.name + " (" + text + ")", text);
+                    break outer;
+                }
+
+                // First try to match if the entered string as an URL
+                Matcher m = s.urlRegEx.matcher(text);
+                if(m.find()) {
+                    String id = m.group(1);
+                    String newURL = s.wmsUrl.replaceAll("__s__", id);
+                    String title = s.name + " (" + id + ")";
+                    addWMSLayer(title, newURL);
+                    break outer;
+                }
+                // If not, look if it's a valid ID for the selected service
+                if(s.idValidator.matcher(text).matches()) {
+                    String newURL = s.wmsUrl.replaceAll("__s__", text);
+                    String title = s.name + " (" + text + ")";
+                    addWMSLayer(title, newURL);
+                    break outer;
+                }
+
+                // We've found the selected service, but the entered string isn't suitable for
+                // it. So quit checking the other radio buttons
+                break;
+            }
+
+            // and display an error message. The while(true) ensures that the dialog pops up again
+            JOptionPane.showMessageDialog(Main.parent,
+                    tr("Couldn''t match the entered link or id to the selected service. Please try again."),
+                    tr("No valid WMS URL or id"),
+                    JOptionPane.ERROR_MESSAGE);
+            diag.setVisible(true);
+        }
+    }
+
+    /**
+     * Adds a WMS Layer with given title and URL
+     * @param title Name of the layer as it will shop up in the layer manager
+     * @param url URL to the WMS server
+     */
+    private void addWMSLayer(String title, String url) {
+        Main.main.addLayer(new WMSLayer(new ImageryInfo(title, url)));
+    }
+
+    @Override
+    protected void updateEnabledState() {
+        setEnabled(Main.isDisplayingMapView() && !Main.map.mapView.getAllLayers().isEmpty());
+    }
+}
Index: unk/src/org/openstreetmap/josm/actions/Map_Rectifier_WMSmenuAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/Map_Rectifier_WMSmenuAction.java	(revision 6245)
+++ 	(revision )
@@ -1,226 +1,0 @@
-// License: GPL. For details, see LICENSE file.
-package org.openstreetmap.josm.actions;
-
-import static org.openstreetmap.josm.tools.I18n.tr;
-
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.event.ActionEvent;
-import java.awt.event.KeyEvent;
-import java.util.ArrayList;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.swing.ButtonGroup;
-import javax.swing.JLabel;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import javax.swing.JRadioButton;
-
-import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.data.imagery.ImageryInfo;
-import org.openstreetmap.josm.gui.ExtendedDialog;
-import org.openstreetmap.josm.gui.layer.WMSLayer;
-import org.openstreetmap.josm.tools.GBC;
-import org.openstreetmap.josm.tools.Shortcut;
-import org.openstreetmap.josm.tools.UrlLabel;
-import org.openstreetmap.josm.tools.Utils;
-import org.openstreetmap.josm.gui.widgets.JosmTextField;
-
-public class Map_Rectifier_WMSmenuAction extends JosmAction {
-    /**
-     * Class that bundles all required information of a rectifier service
-     */
-    public static class RectifierService {
-        private final String name;
-        private final String url;
-        private final String wmsUrl;
-        private final Pattern urlRegEx;
-        private final Pattern idValidator;
-        public JRadioButton btn;
-
-        /**
-         * @param name Name of the rectifing service
-         * @param url URL to the service where users can register, upload, etc.
-         * @param wmsUrl URL to the WMS server where JOSM will grab the images. Insert __s__ where the ID should be placed
-         * @param urlRegEx a regular expression that determines if a given URL is one of the service and returns the WMS id if so
-         * @param idValidator regular expression that checks if a given ID is syntactically valid
-         */
-        public RectifierService(String name, String url, String wmsUrl, String urlRegEx, String idValidator) {
-            this.name = name;
-            this.url = url;
-            this.wmsUrl = wmsUrl;
-            this.urlRegEx = Pattern.compile(urlRegEx);
-            this.idValidator = Pattern.compile(idValidator);
-        }
-
-        public boolean isSelected() {
-            return btn.isSelected();
-        }
-    }
-
-    /**
-     * List of available rectifier services. May be extended from the outside
-     */
-    public ArrayList<RectifierService> services = new ArrayList<RectifierService>();
-
-    public Map_Rectifier_WMSmenuAction() {
-        super(tr("Rectified Image..."),
-                "OLmarker",
-                tr("Download Rectified Images From Various Services"),
-                Shortcut.registerShortcut("imagery:rectimg",
-                        tr("Imagery: {0}", tr("Rectified Image...")),
-                        KeyEvent.CHAR_UNDEFINED, Shortcut.NONE),
-                true
-        );
-
-        // Add default services
-        services.add(
-                new RectifierService("Metacarta Map Rectifier",
-                        "http://labs.metacarta.com/rectifier/",
-                        "http://labs.metacarta.com/rectifier/wms.cgi?id=__s__&srs=EPSG:4326"
-                        + "&Service=WMS&Version=1.1.0&Request=GetMap&format=image/png&",
-                        // This matches more than the "classic" WMS link, so users can pretty much
-                        // copy any link as long as it includes the ID
-                        "labs\\.metacarta\\.com/(?:.*?)(?:/|=)([0-9]+)(?:\\?|/|\\.|$)",
-                "^[0-9]+$")
-        );
-        services.add(
-                new RectifierService("Map Warper",
-                        "http://mapwarper.net/",
-                        "http://mapwarper.net/maps/wms/__s__?request=GetMap&version=1.1.1"
-                        + "&styles=&format=image/png&srs=epsg:4326&exceptions=application/vnd.ogc.se_inimage&",
-                        // This matches more than the "classic" WMS link, so users can pretty much
-                        // copy any link as long as it includes the ID
-                        "(?:mapwarper\\.net|warper\\.geothings\\.net)/(?:.*?)/([0-9]+)(?:\\?|/|\\.|$)",
-                "^[0-9]+$")
-        );
-
-        // This service serves the purpose of "just this once" without forcing the user
-        // to commit the link to the preferences
-
-        // Clipboard content gets trimmed, so matching whitespace only ensures that this
-        // service will never be selected automatically.
-        services.add(new RectifierService(tr("Custom WMS Link"), "", "", "^\\s+$", ""));
-    }
-
-    @Override
-    public void actionPerformed(ActionEvent e) {
-        if (!isEnabled()) return;
-        JPanel panel = new JPanel(new GridBagLayout());
-        panel.add(new JLabel(tr("Supported Rectifier Services:")), GBC.eol());
-
-        JosmTextField tfWmsUrl = new JosmTextField(30);
-
-        String clip = Utils.getClipboardContent();
-        clip = clip == null ? "" : clip.trim();
-        ButtonGroup group = new ButtonGroup();
-
-        JRadioButton firstBtn = null;
-        for(RectifierService s : services) {
-            JRadioButton serviceBtn = new JRadioButton(s.name);
-            if(firstBtn == null) {
-                firstBtn = serviceBtn;
-            }
-            // Checks clipboard contents against current service if no match has been found yet.
-            // If the contents match, they will be inserted into the text field and the corresponding
-            // service will be pre-selected.
-            if(!clip.isEmpty() && tfWmsUrl.getText().isEmpty()
-                    && (s.urlRegEx.matcher(clip).find() || s.idValidator.matcher(clip).matches())) {
-                serviceBtn.setSelected(true);
-                tfWmsUrl.setText(clip);
-            }
-            s.btn = serviceBtn;
-            group.add(serviceBtn);
-            if(!s.url.isEmpty()) {
-                panel.add(serviceBtn, GBC.std());
-                panel.add(new UrlLabel(s.url, tr("Visit Homepage")), GBC.eol().anchor(GridBagConstraints.EAST));
-            } else {
-                panel.add(serviceBtn, GBC.eol().anchor(GridBagConstraints.WEST));
-            }
-        }
-
-        // Fallback in case no match was found
-        if(tfWmsUrl.getText().isEmpty() && firstBtn != null) {
-            firstBtn.setSelected(true);
-        }
-
-        panel.add(new JLabel(tr("WMS URL or Image ID:")), GBC.eol());
-        panel.add(tfWmsUrl, GBC.eol().fill(GridBagConstraints.HORIZONTAL));
-
-        ExtendedDialog diag = new ExtendedDialog(Main.parent,
-                tr("Add Rectified Image"),
-
-                new String[] {tr("Add Rectified Image"), tr("Cancel")});
-        diag.setContent(panel);
-        diag.setButtonIcons(new String[] {"OLmarker.png", "cancel.png"});
-
-        // This repeatedly shows the dialog in case there has been an error.
-        // The loop is break;-ed if the users cancels
-        outer: while(true) {
-            diag.showDialog();
-            int answer = diag.getValue();
-            // Break loop when the user cancels
-            if(answer != 1) {
-                break;
-            }
-
-            String text = tfWmsUrl.getText().trim();
-            // Loop all services until we find the selected one
-            for(RectifierService s : services) {
-                if(!s.isSelected()) {
-                    continue;
-                }
-
-                // We've reached the custom WMS URL service
-                // Just set the URL and hope everything works out
-                if(s.wmsUrl.isEmpty()) {
-                    addWMSLayer(s.name + " (" + text + ")", text);
-                    break outer;
-                }
-
-                // First try to match if the entered string as an URL
-                Matcher m = s.urlRegEx.matcher(text);
-                if(m.find()) {
-                    String id = m.group(1);
-                    String newURL = s.wmsUrl.replaceAll("__s__", id);
-                    String title = s.name + " (" + id + ")";
-                    addWMSLayer(title, newURL);
-                    break outer;
-                }
-                // If not, look if it's a valid ID for the selected service
-                if(s.idValidator.matcher(text).matches()) {
-                    String newURL = s.wmsUrl.replaceAll("__s__", text);
-                    String title = s.name + " (" + text + ")";
-                    addWMSLayer(title, newURL);
-                    break outer;
-                }
-
-                // We've found the selected service, but the entered string isn't suitable for
-                // it. So quit checking the other radio buttons
-                break;
-            }
-
-            // and display an error message. The while(true) ensures that the dialog pops up again
-            JOptionPane.showMessageDialog(Main.parent,
-                    tr("Couldn''t match the entered link or id to the selected service. Please try again."),
-                    tr("No valid WMS URL or id"),
-                    JOptionPane.ERROR_MESSAGE);
-            diag.setVisible(true);
-        }
-    }
-
-    /**
-     * Adds a WMS Layer with given title and URL
-     * @param title Name of the layer as it will shop up in the layer manager
-     * @param url URL to the WMS server
-     */
-    private void addWMSLayer(String title, String url) {
-        Main.main.addLayer(new WMSLayer(new ImageryInfo(title, url)));
-    }
-
-    @Override
-    protected void updateEnabledState() {
-        setEnabled(Main.isDisplayingMapView() && !Main.map.mapView.getAllLayers().isEmpty());
-    }
-}
Index: /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java	(revision 6246)
@@ -161,5 +161,5 @@
             boolean merge = Main.pref.getBoolean("download.gps.mergeWithLocal", false);
             Layer active = Main.map.mapView.getActiveLayer();
-            if (active != null && active instanceof GpxLayer && (merge || ((GpxLayer)active).data.fromServer))
+            if (active instanceof GpxLayer && (merge || ((GpxLayer)active).data.fromServer))
                 return (GpxLayer) active;
             for (GpxLayer l : Main.map.mapView.getLayersOfType(GpxLayer.class)) {
Index: /trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 6246)
@@ -179,5 +179,5 @@
 
         // update selection to reflect which way being modified
-        if (currentBaseNode != null && getCurrentDataSet() != null && getCurrentDataSet().getSelected().isEmpty() == false) {
+        if (currentBaseNode != null && getCurrentDataSet() != null && !getCurrentDataSet().getSelected().isEmpty()) {
             Way continueFrom = getWayForNode(currentBaseNode);
             if (alt && continueFrom != null && (!currentBaseNode.isSelected() || continueFrom.isSelected())) {
Index: /trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java	(revision 6246)
@@ -310,5 +310,5 @@
             return;
 
-        if(sanityCheck() == false)
+        if (!sanityCheck())
             return;
 
@@ -586,8 +586,4 @@
     }
 
-    private String getStringPref(String subKey) {
-        return getStringPref(subKey, null);
-    }
-
     @Override
     public void preferenceChanged(PreferenceChangeEvent e) {
Index: /trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 6246)
@@ -312,5 +312,5 @@
                 // only show merge to node cursor if nearby node and that node is currently
                 // not being dragged
-                final boolean hasTarget = osm != null && osm instanceof Node && !osm.isSelected();
+                final boolean hasTarget = osm instanceof Node && !osm.isSelected();
                 c = hasTarget ? "merge_to_node" : "merge";
                 break;
Index: /trunk/src/org/openstreetmap/josm/command/RotateCommand.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/command/RotateCommand.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/command/RotateCommand.java	(revision 6246)
@@ -26,10 +26,4 @@
 
     /**
-     * World position of the mouse when the user started the command.
-     *
-     */
-    EastNorth startEN = null;
-
-    /**
      * angle of rotation starting click to pivot
      */
@@ -49,11 +43,4 @@
 
         pivot = getNodesCenter();
-
-        // We remember the very first position of the mouse for this action.
-        // Note that SelectAction will keep the same ScaleCommand when the user
-        // releases the button and presses it again with the same modifiers.
-        // The very first point of this operation is stored here.
-        startEN   = currentEN;
-
         startAngle = getAngle(currentEN);
         rotationAngle = 0.0;
Index: /trunk/src/org/openstreetmap/josm/data/Version.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/Version.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/data/Version.java	(revision 6246)
@@ -131,5 +131,5 @@
         isLocalBuild = false;
         value = properties.get("Is-Local-Build");
-        if (value != null && value.trim().toLowerCase().equals("true"))  {
+        if (value != null && value.trim().equalsIgnoreCase("true"))  {
             isLocalBuild = true;
         }
Index: /trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java	(revision 6246)
@@ -1,5 +1,3 @@
-//License: GPLv2 or later
-//Copyright 2007 by Raphael Mack and others
-
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.data.gpx;
 
Index: /trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java	(revision 6246)
@@ -398,5 +398,5 @@
     @Override
     public void setVisible(boolean visible) throws IllegalStateException{
-        if (isNew() && visible == false)
+        if (isNew() && !visible)
             throw new IllegalStateException(tr("A primitive with ID = 0 cannot be invisible."));
         updateFlags(FLAG_VISIBLE, visible);
Index: /trunk/src/org/openstreetmap/josm/data/osm/WaySegment.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/WaySegment.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/data/osm/WaySegment.java	(revision 6246)
@@ -50,5 +50,5 @@
 
     @Override public boolean equals(Object o) {
-        return o != null && o instanceof WaySegment
+        return o instanceof WaySegment
             && ((WaySegment) o).way == way
             && ((WaySegment) o).lowerIndex == lowerIndex;
Index: /trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 6246)
@@ -84,5 +84,5 @@
      */
     @SuppressWarnings("unchecked")
-    public static Class<Test>[] allAvailableTests = new Class[] {
+    private static final Class<Test>[] allAvailableTests = new Class[] {
         DuplicateNode.class, // ID    1 ..   99
         OverlappingWays.class, // ID  101 ..  199
Index: /trunk/src/org/openstreetmap/josm/gui/ImageryMenu.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/ImageryMenu.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/ImageryMenu.java	(revision 6246)
@@ -27,5 +27,5 @@
 import org.openstreetmap.josm.actions.AddImageryLayerAction;
 import org.openstreetmap.josm.actions.JosmAction;
-import org.openstreetmap.josm.actions.Map_Rectifier_WMSmenuAction;
+import org.openstreetmap.josm.actions.MapRectifierWMSmenuAction;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.imagery.ImageryInfo;
@@ -80,5 +80,5 @@
     private JMenuItem singleOffset = new JMenuItem(offsetAction);
     private JMenuItem offsetMenuItem = singleOffset;
-    private Map_Rectifier_WMSmenuAction rectaction = new Map_Rectifier_WMSmenuAction();
+    private MapRectifierWMSmenuAction rectaction = new MapRectifierWMSmenuAction();
 
     public ImageryMenu(JMenu subMenu) {
Index: /trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 6246)
@@ -395,5 +395,4 @@
         if ((!args.containsKey(Option.NO_MAXIMIZE) && maximized) || args.containsKey(Option.MAXIMIZE)) {
             if (Toolkit.getDefaultToolkit().isFrameStateSupported(JFrame.MAXIMIZED_BOTH)) {
-                // Main.debug("Main window maximized");
                 Main.windowState = JFrame.MAXIMIZED_BOTH;
                 mainFrame.setExtendedState(Main.windowState);
@@ -401,8 +400,6 @@
                 Main.debug("Main window: maximizing not supported");
             }
-        } else {
-            // Main.debug("Main window not maximized");
-        }
-        if(main.menu.fullscreenToggleAction != null) {
+        }
+        if (main.menu.fullscreenToggleAction != null) {
             main.menu.fullscreenToggleAction.initial();
         }
Index: /trunk/src/org/openstreetmap/josm/gui/MainMenu.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MainMenu.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/MainMenu.java	(revision 6246)
@@ -329,5 +329,5 @@
     public final JMenu helpMenu = addMenu(marktr("Help"), KeyEvent.VK_H, 11, ht("/Menu/Help"));
 
-    private final int defaultMenuPos = 11;
+    private static final int defaultMenuPos = 11;
 
     public final JosmAction moveUpAction = new MoveAction(MoveAction.Direction.UP);
Index: /trunk/src/org/openstreetmap/josm/gui/MapFrame.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MapFrame.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/MapFrame.java	(revision 6246)
@@ -429,5 +429,5 @@
          */
         sideToolBar.setComponentPopupMenu(new JPopupMenu() {
-            final int staticMenuEntryCount = 2;
+            static final int staticMenuEntryCount = 2;
             JCheckBoxMenuItem doNotHide = new JCheckBoxMenuItem(new AbstractAction(tr("Do not hide toolbar")) {
                 @Override
Index: /trunk/src/org/openstreetmap/josm/gui/MenuScroller.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MenuScroller.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/MenuScroller.java	(revision 6246)
@@ -1,4 +1,4 @@
 /**
- * @(#)MenuScroller.java    1.5.0 04/02/12
+ * MenuScroller.java    1.5.0 04/02/12
  * License: use / modify without restrictions (see http://tips4java.wordpress.com/about/)
  */
@@ -438,5 +438,5 @@
      */
     @Override
-    public void finalize() throws Throwable {
+    protected void finalize() throws Throwable {
         dispose();
     }
Index: /trunk/src/org/openstreetmap/josm/gui/OsmPrimitivRenderer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/OsmPrimitivRenderer.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/OsmPrimitivRenderer.java	(revision 6246)
@@ -70,5 +70,5 @@
      */
     private Component renderer(Component def, OsmPrimitive value) {
-        if (def != null && value != null && def instanceof JLabel) {
+        if (value != null && def instanceof JLabel) {
             ((JLabel)def).setText(getComponentText(value));
             ImageIcon icon = ImageProvider.get(value.getDisplayType());
@@ -91,5 +91,5 @@
      */
     private Component renderer(Component def, HistoryOsmPrimitive value) {
-        if (def != null && value != null && def instanceof JLabel) {
+        if (value != null && def instanceof JLabel) {
             ((JLabel)def).setText(value.getDisplayName(DefaultNameFormatter.getInstance()));
             ((JLabel)def).setIcon(ImageProvider.get(value.getType()));
Index: /trunk/src/org/openstreetmap/josm/gui/SideButton.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/SideButton.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/SideButton.java	(revision 6246)
@@ -29,6 +29,5 @@
     private PropertyChangeListener propertyChangeListener;
 
-    public SideButton(Action action)
-    {
+    public SideButton(Action action) {
         super(action);
         fixIcon(action);
@@ -36,6 +35,5 @@
     }
 
-    public SideButton(Action action, boolean usename)
-    {
+    public SideButton(Action action, boolean usename) {
         super(action);
         if(!usename) {
@@ -46,6 +44,5 @@
     }
 
-    public SideButton(Action action, String imagename)
-    {
+    public SideButton(Action action, String imagename) {
         super(action);
         setIcon(makeIcon(imagename));
@@ -67,5 +64,5 @@
         }
         Icon i = getIcon();
-        if (i != null && i instanceof ImageIcon && i.getIconHeight() != iconHeight) {
+        if (i instanceof ImageIcon && i.getIconHeight() != iconHeight) {
             setIcon(getScaledImage(((ImageIcon) i).getImage()));
         }
Index: /trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java	(revision 6246)
@@ -17,5 +17,4 @@
 import java.util.HashSet;
 import java.util.List;
-import java.util.Vector;
 import java.util.concurrent.CopyOnWriteArrayList;
 
@@ -382,5 +381,5 @@
         MapMarkerDot xmax_ymax = new MapMarkerDot(bbox.getMaxLat(), bbox.getMaxLon());
 
-        Vector<MapMarker> marker = new Vector<MapMarker>(2);
+        List<MapMarker> marker = new ArrayList<MapMarker>(2);
         marker.add(xmin_ymin);
         marker.add(xmax_ymax);
Index: /trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java	(revision 6246)
@@ -21,7 +21,8 @@
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
+import java.util.ArrayList;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Set;
-import java.util.Vector;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -50,7 +51,7 @@
 import org.openstreetmap.josm.gui.widgets.AbstractTextComponentValidator;
 import org.openstreetmap.josm.gui.widgets.HtmlPanel;
+import org.openstreetmap.josm.gui.widgets.JosmTextField;
 import org.openstreetmap.josm.gui.widgets.SelectAllOnFocusGainedDecorator;
 import org.openstreetmap.josm.tools.ImageProvider;
-import org.openstreetmap.josm.gui.widgets.JosmTextField;
 
 /**
@@ -156,5 +157,5 @@
         MapMarkerDot xmax_ymax = new MapMarkerDot(bbox.getMaxLat(), bbox.getMaxLon());
 
-        Vector<MapMarker> marker = new Vector<MapMarker>(2);
+        List<MapMarker> marker = new ArrayList<MapMarker>(2);
         marker.add(xmin_ymin);
         marker.add(xmax_ymax);
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java	(revision 6246)
@@ -20,5 +20,5 @@
     protected List<ToggleDialog> allDialogs = new ArrayList<ToggleDialog>();
     protected MultiSplitPane mSpltPane = new MultiSplitPane();
-    final protected int DIVIDER_SIZE = 5;
+    protected static final int DIVIDER_SIZE = 5;
 
     /**
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 6246)
@@ -236,5 +236,5 @@
         public void actionPerformed(ActionEvent e) {
             toggleButtonHook();
-            if(getValue("toolbarbutton") != null && getValue("toolbarbutton") instanceof JButton) {
+            if (getValue("toolbarbutton") instanceof JButton) {
                 ((JButton) getValue("toolbarbutton")).setSelected(!isShowing);
             }
@@ -255,9 +255,4 @@
                 showNotify();
             }
-        }
-
-        @Override
-        public void destroy() {
-            super.destroy();
         }
     }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 6246)
@@ -822,8 +822,8 @@
                         ++cnt;
                     } else if (cnt == 0) {
-                        positionString += "," + String.valueOf(cur);
+                        positionString += "," + cur;
                     } else {
-                        positionString += "-" + String.valueOf(last);
-                        positionString += "," + String.valueOf(cur);
+                        positionString += "-" + last;
+                        positionString += "," + cur;
                         cnt = 0;
                     }
@@ -831,5 +831,5 @@
                 }
                 if (cnt >= 1) {
-                    positionString += "-" + String.valueOf(last);
+                    positionString += "-" + last;
                 }
             }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java	(revision 6246)
@@ -38,5 +38,4 @@
 import java.util.List;
 import java.util.Map;
-import java.util.Vector;
 
 import javax.swing.AbstractAction;
@@ -374,16 +373,15 @@
                     }
                 }
-                Collection<Command> commands=new Vector<Command>();
+                Collection<Command> commands = new ArrayList<Command>();
                 commands.add(new ChangePropertyCommand(sel, key, null));
                 if (value.equals(tr("<different>"))) {
-                    HashMap<String, Vector<OsmPrimitive>> map=new HashMap<String, Vector<OsmPrimitive>>();
+                    Map<String, ArrayList<OsmPrimitive>> map = new HashMap<String, ArrayList<OsmPrimitive>>();
                     for (OsmPrimitive osm: sel) {
-                        String val=osm.get(key);
-                        if(val != null)
-                        {
+                        String val = osm.get(key);
+                        if (val != null) {
                             if (map.containsKey(val)) {
                                 map.get(val).add(osm);
                             } else {
-                                Vector<OsmPrimitive> v = new Vector<OsmPrimitive>();
+                                ArrayList<OsmPrimitive> v = new ArrayList<OsmPrimitive>();
                                 v.add(osm);
                                 map.put(val, v);
@@ -391,5 +389,5 @@
                         }
                     }
-                    for (Map.Entry<String, Vector<OsmPrimitive>> e: map.entrySet()) {
+                    for (Map.Entry<String, ArrayList<OsmPrimitive>> e: map.entrySet()) {
                         commands.add(new ChangePropertyCommand(e.getValue(), newkey, e.getKey()));
                     }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberRoleCellEditor.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberRoleCellEditor.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberRoleCellEditor.java	(revision 6246)
@@ -50,14 +50,4 @@
     }
 
-    @Override
-    public void cancelCellEditing() {
-        super.cancelCellEditing();
-    }
-
-    @Override
-    public boolean stopCellEditing() {
-        return super.stopCellEditing();
-    }
-
     /** Returns the edit field for this cell editor. */
     public AutoCompletingTextField getEditor() {
Index: /trunk/src/org/openstreetmap/josm/gui/history/TwoColumnDiff.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/history/TwoColumnDiff.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/history/TwoColumnDiff.java	(revision 6246)
@@ -65,5 +65,5 @@
     private void diff() {
         Diff diff = new Diff(reference, current);
-        Diff.change script = diff.diff_2(false);
+        Diff.Change script = diff.diff_2(false);
         twoColumnDiffFromScript(script, reference, current);
     }
@@ -73,5 +73,5 @@
      * This method expands this script into a full two column description.
      */
-    private void twoColumnDiffFromScript(Diff.change script, Object[] a, Object[] b) {
+    private void twoColumnDiffFromScript(Diff.Change script, Object[] a, Object[] b) {
         int ia = 0;
         int ib = 0;
Index: /trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java	(revision 6246)
@@ -122,5 +122,5 @@
 
     protected GeorefImage[][] images;
-    protected final int serializeFormatVersion = 5;
+    protected static final int serializeFormatVersion = 5;
     protected boolean autoDownloadEnabled = true;
     protected boolean autoResolutionEnabled = true;
Index: /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 6246)
@@ -37,5 +37,4 @@
 import java.util.List;
 import java.util.TimeZone;
-import java.util.Vector;
 import java.util.zip.GZIPInputStream;
 
@@ -116,5 +115,5 @@
 
     ExtendedDialog syncDialog;
-    Vector<GpxDataWrapper> gpxLst = new Vector<GpxDataWrapper>();
+    List<GpxDataWrapper> gpxLst = new ArrayList<GpxDataWrapper>();
     JPanel outerPanel;
     JosmComboBox cbGpx;
@@ -292,5 +291,5 @@
 
             String[] tmp = TimeZone.getAvailableIDs();
-            Vector<String> vtTimezones = new Vector<String>(tmp.length);
+            List<String> vtTimezones = new ArrayList<String>(tmp.length);
 
             for (String tzStr : tmp) {
@@ -904,5 +903,5 @@
             // This is called whenever one of the sliders is moved.
             // It updates the labels and also calls the "match photos" code
-            class sliderListener implements ChangeListener {
+            class SliderListener implements ChangeListener {
                 @Override
                 public void stateChanged(ChangeEvent e) {
@@ -970,10 +969,10 @@
 
             // Call the sliderListener once manually so labels get adjusted
-            new sliderListener().stateChanged(null);
+            new SliderListener().stateChanged(null);
             // Listeners added here, otherwise it tries to match three times
             // (when setting the default values)
-            sldTimezone.addChangeListener(new sliderListener());
-            sldMinutes.addChangeListener(new sliderListener());
-            sldSeconds.addChangeListener(new sliderListener());
+            sldTimezone.addChangeListener(new SliderListener());
+            sldMinutes.addChangeListener(new SliderListener());
+            sldSeconds.addChangeListener(new SliderListener());
 
             // There is no way to cancel this dialog, all changes get applied
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSourceHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSourceHandler.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSourceHandler.java	(revision 6246)
@@ -31,6 +31,5 @@
         AreaPrototype area = new AreaPrototype();
         IconPrototype icon = new IconPrototype();
-        public void init()
-        {
+        public void init() {
             conditions = null;
             scaleMax = Double.POSITIVE_INFINITY;
@@ -50,6 +49,5 @@
     }
 
-    Color convertColor(String colString)
-    {
+    Color convertColor(String colString) {
         int i = colString.indexOf('#');
         Color ret;
@@ -80,14 +78,11 @@
 
     private void startElementLine(String qName, Attributes atts, LinePrototype line) {
-        for (int count=0; count<atts.getLength(); count++)
-        {
-            if(atts.getQName(count).equals("width"))
-            {
+        for (int count=0; count<atts.getLength(); count++) {
+            if(atts.getQName(count).equals("width")) {
                 String val = atts.getValue(count);
                 if (! (val.startsWith("+") || val.startsWith("-") || val.endsWith("%"))) {
                     line.setWidth(Integer.parseInt(val));
                 }
-            }
-            else if (atts.getQName(count).equals("colour")) {
+            } else if (atts.getQName(count).equals("colour")) {
                 line.color=convertColor(atts.getValue(count));
             } else if (atts.getQName(count).equals("realwidth")) {
@@ -122,21 +117,14 @@
     private void startElementLinemod(String qName, Attributes atts, LinemodPrototype line) {
         startElementLine(qName, atts, line);
-        for (int count=0; count<atts.getLength(); count++)
-        {
-            if(atts.getQName(count).equals("width"))
-            {
+        for (int count=0; count<atts.getLength(); count++) {
+            if (atts.getQName(count).equals("width")) {
                 String val = atts.getValue(count);
-                if(val.startsWith("+"))
-                {
+                if (val.startsWith("+")) {
                     line.setWidth(Integer.parseInt(val.substring(1)));
                     line.widthMode = LinemodPrototype.WidthMode.OFFSET;
-                }
-                else if(val.startsWith("-"))
-                {
+                } else if(val.startsWith("-")) {
                     line.setWidth(Integer.parseInt(val));
                     line.widthMode = LinemodPrototype.WidthMode.OFFSET;
-                }
-                else if(val.endsWith("%"))
-                {
+                } else if(val.endsWith("%")) {
                     line.setWidth(Integer.parseInt(val.substring(0, val.length()-1)));
                     line.widthMode = LinemodPrototype.WidthMode.PERCENT;
@@ -151,10 +139,8 @@
 
     @Override public void startElement(String uri,String name, String qName, Attributes atts) {
-        if (inDoc==true)
-        {
+        if (inDoc) {
             if (qName.equals("rule")) {
                 inRule=true;
-            } else if (qName.equals("rules"))
-            {
+            } else if (qName.equals("rules")) {
                 if (style.name == null) {
                     style.name = atts.getValue("name");
@@ -166,15 +152,12 @@
                     style.icon = atts.getValue("icon");
                 }
-            }
-            else if (qName.equals("scale_max")) {
+            } else if (qName.equals("scale_max")) {
                 inScaleMax = true;
             } else if (qName.equals("scale_min")) {
                 inScaleMin = true;
-            } else if (qName.equals("condition") && inRule)
-            {
+            } else if (qName.equals("condition") && inRule) {
                 inCondition=true;
                 XmlCondition c = rule.cond;
-                if(c.key != null)
-                {
+                if (c.key != null) {
                     if(rule.conditions == null) {
                         rule.conditions = new LinkedList<XmlCondition>();
@@ -184,9 +167,8 @@
                     rule.conditions.add(c);
                 }
-                for (int count=0; count<atts.getLength(); count++)
-                {
-                    if(atts.getQName(count).equals("k")) {
+                for (int count=0; count<atts.getLength(); count++) {
+                    if (atts.getQName(count).equals("k")) {
                         c.key = atts.getValue(count);
-                    } else if(atts.getQName(count).equals("v")) {
+                    } else if (atts.getQName(count).equals("v")) {
                         c.value = atts.getValue(count);
                     } else if(atts.getQName(count).equals("b")) {
@@ -199,20 +181,13 @@
                     error("The condition has no key!");
                 }
-            }
-            else if (qName.equals("line"))
-            {
+            } else if (qName.equals("line")) {
                 hadLine = inLine = true;
                 startElementLine(qName, atts, rule.line);
-            }
-            else if (qName.equals("linemod"))
-            {
+            } else if (qName.equals("linemod")) {
                 hadLineMod = inLineMod = true;
                 startElementLinemod(qName, atts, rule.linemod);
-            }
-            else if (qName.equals("icon"))
-            {
+            } else if (qName.equals("icon")) {
                 inIcon = true;
-                for (int count=0; count<atts.getLength(); count++)
-                {
+                for (int count=0; count<atts.getLength(); count++) {
                     if (atts.getQName(count).equals("src")) {
                         IconReference icon = new IconReference(atts.getValue(count), style);
@@ -227,7 +202,5 @@
                     }
                 }
-            }
-            else if (qName.equals("area"))
-            {
+            } else if (qName.equals("area")) {
                 hadArea = inArea = true;
                 for (int count=0; count<atts.getLength(); count++)
@@ -251,22 +224,20 @@
     @Override public void endElement(String uri,String name, String qName)
     {
-        if (inRule && qName.equals("rule"))
-        {
-            if(hadLine)
+        if (inRule && qName.equals("rule")) {
+            if (hadLine) {
+                style.add(rule.cond, rule.conditions,
+                        new LinePrototype(rule.line, new Range(rule.scaleMin, rule.scaleMax)));
+            }
+            if (hadLineMod)
             {
                 style.add(rule.cond, rule.conditions,
-                        new LinePrototype(rule.line, new Range(rule.scaleMin, rule.scaleMax)));
-            }
-            if(hadLineMod)
+                        new LinemodPrototype(rule.linemod, new Range(rule.scaleMin, rule.scaleMax)));
+            }
+            if (hadIcon)
             {
                 style.add(rule.cond, rule.conditions,
-                        new LinemodPrototype(rule.linemod, new Range(rule.scaleMin, rule.scaleMax)));
-            }
-            if(hadIcon)
-            {
-                style.add(rule.cond, rule.conditions,
                         new IconPrototype(rule.icon, new Range(rule.scaleMin, rule.scaleMax)));
             }
-            if(hadArea)
+            if (hadArea)
             {
                 style.add(rule.cond, rule.conditions,
@@ -276,6 +247,5 @@
             hadLine = hadLineMod = hadIcon = hadArea = false;
             rule.init();
-        }
-        else if (inCondition && qName.equals("condition")) {
+        } else if (inCondition && qName.equals("condition")) {
             inCondition = false;
         } else if (inLine && qName.equals("line")) {
@@ -294,9 +264,8 @@
     }
 
-    @Override public void characters(char[] ch, int start, int length)
-    {
-        if (inScaleMax == true) {
+    @Override public void characters(char[] ch, int start, int length) {
+        if (inScaleMax) {
             rule.scaleMax = Long.parseLong(new String(ch, start, length));
-        } else if (inScaleMin == true) {
+        } else if (inScaleMin) {
             rule.scaleMin = Long.parseLong(new String(ch, start, length));
         }
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java	(revision 6246)
@@ -332,5 +332,9 @@
                         +"</html>", null, "")) {
                     Main.pref.resetToDefault();
-                    try { Main.pref.save(); } catch (IOException ex) {}
+                    try {
+                        Main.pref.save();
+                    } catch (IOException e) {
+                        Main.warn("IOException while saving preferences: "+e.getMessage());
+                    }
                     readPreferences(Main.pref);
                     applyFilter();
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java	(revision 6246)
@@ -63,5 +63,4 @@
         } catch (Exception ex) {
             // just ignore, Quaqua may not even be installed...
-            //System.out.println("Failed to load Quaqua: " + ex);
         }
 
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java	(revision 6246)
@@ -86,5 +86,5 @@
     static class MapPaintSourceEditor extends SourceEditor {
 
-        final private String iconpref = "mappaint.icon.sources";
+        private static final String iconpref = "mappaint.icon.sources";
 
         public MapPaintSourceEditor() {
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java	(revision 6246)
@@ -187,5 +187,5 @@
     static class TaggingPresetSourceEditor extends SourceEditor {
 
-        final private String iconpref = "taggingpreset.icon.sources";
+        private static final String iconpref = "taggingpreset.icon.sources";
 
         public TaggingPresetSourceEditor() {
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/projection/CodeProjectionChoice.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/projection/CodeProjectionChoice.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/projection/CodeProjectionChoice.java	(revision 6246)
@@ -50,5 +50,5 @@
         List<String> data;
         List<String> filteredData;
-        final String DEFAULT_CODE = "EPSG:3857";
+        static final String DEFAULT_CODE = "EPSG:3857";
         String lastCode = DEFAULT_CODE;
         ActionListener listener;
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/projection/LambertProjectionChoice.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/projection/LambertProjectionChoice.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/projection/LambertProjectionChoice.java	(revision 6246)
@@ -16,5 +16,5 @@
 public class LambertProjectionChoice extends ListProjectionChoice {
 
-    public static String[] lambert4zones = {
+    private static final String[] lambert4zones = {
         tr("{0} ({1} to {2} degrees)", 1,"51.30","48.15"),
         tr("{0} ({1} to {2} degrees)", 2,"48.15","45.45"),
@@ -23,4 +23,7 @@
     };
 
+    /**
+     * Constructs a new {@code LambertProjectionChoice}.
+     */
     public LambertProjectionChoice() {
         super(tr("Lambert 4 Zones (France)"), "core:lambert", lambert4zones, tr("Lambert CC Zone"));
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java	(revision 6246)
@@ -175,5 +175,5 @@
          * Using the UTM transvers Mercator projection and specific geodesic settings.
          */
-        registerProjectionChoice(utm_france_dom = new UTM_France_DOM_ProjectionChoice());                            // FR
+        registerProjectionChoice(utm_france_dom = new UTMFranceDOMProjectionChoice());                            // FR
 
         /**
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMFranceDOMProjectionChoice.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMFranceDOMProjectionChoice.java	(revision 6246)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMFranceDOMProjectionChoice.java	(revision 6246)
@@ -0,0 +1,72 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.preferences.projection;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.util.Collection;
+import java.util.Collections;
+
+public class UTMFranceDOMProjectionChoice extends ListProjectionChoice {
+
+    private final static String FortMarigotName = tr("Guadeloupe Fort-Marigot 1949");
+    private final static String SainteAnneName = tr("Guadeloupe Ste-Anne 1948");
+    private final static String MartiniqueName = tr("Martinique Fort Desaix 1952");
+    private final static String Reunion92Name = tr("Reunion RGR92");
+    private final static String Guyane92Name = tr("Guyane RGFG95");
+    private final static String[] utmGeodesicsNames = { FortMarigotName, SainteAnneName, MartiniqueName, Reunion92Name, Guyane92Name};
+
+    private final static Integer FortMarigotEPSG = 2969;
+    private final static Integer SainteAnneEPSG = 2970;
+    private final static Integer MartiniqueEPSG = 2973;
+    private final static Integer ReunionEPSG = 2975;
+    private final static Integer GuyaneEPSG = 2972;
+    private final static Integer[] utmEPSGs = { FortMarigotEPSG, SainteAnneEPSG, MartiniqueEPSG, ReunionEPSG, GuyaneEPSG };
+
+    /**
+     * Constructs a new {@code UTMFranceDOMProjectionChoice}.
+     */
+    public UTMFranceDOMProjectionChoice() {
+        super(tr("UTM France (DOM)"), "core:utmfrancedom", utmGeodesicsNames, tr("UTM Geodesic system"));
+    }
+
+    @Override
+    protected String indexToZone(int index) {
+        return Integer.toString(index + 1);
+    }
+
+    @Override
+    protected int zoneToIndex(String zone) {
+        try {
+            return Integer.parseInt(zone) - 1;
+        } catch(NumberFormatException e) {}
+        return defaultIndex;
+    }
+
+    @Override
+    public String getProjectionName() {
+        return utmGeodesicsNames[index];
+    }
+
+    @Override
+    public String getCurrentCode() {
+        return "EPSG:" + utmEPSGs[index];
+    }
+
+    @Override
+    public String[] allCodes() {
+        String[] res = new String[utmEPSGs.length];
+        for (int i=0; i<utmEPSGs.length; ++i) {
+            res[i] = "EPSG:" + utmEPSGs[i];
+        }
+        return res;
+    }
+
+    @Override
+    public Collection<String> getPreferencesFromCode(String code) {
+        for (int i=0; i < utmEPSGs.length; i++ )
+            if (("EPSG:" + utmEPSGs[i]).equals(code))
+                return Collections.singleton(Integer.toString(i+1));
+        return null;
+    }
+
+}
Index: unk/src/org/openstreetmap/josm/gui/preferences/projection/UTM_France_DOM_ProjectionChoice.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTM_France_DOM_ProjectionChoice.java	(revision 6245)
+++ 	(revision )
@@ -1,69 +1,0 @@
-// License: GPL. For details, see LICENSE file.
-package org.openstreetmap.josm.gui.preferences.projection;
-
-import static org.openstreetmap.josm.tools.I18n.tr;
-
-import java.util.Collection;
-import java.util.Collections;
-
-public class UTM_France_DOM_ProjectionChoice extends ListProjectionChoice {
-
-    private final static String FortMarigotName = tr("Guadeloupe Fort-Marigot 1949");
-    private final static String SainteAnneName = tr("Guadeloupe Ste-Anne 1948");
-    private final static String MartiniqueName = tr("Martinique Fort Desaix 1952");
-    private final static String Reunion92Name = tr("Reunion RGR92");
-    private final static String Guyane92Name = tr("Guyane RGFG95");
-    private final static String[] utmGeodesicsNames = { FortMarigotName, SainteAnneName, MartiniqueName, Reunion92Name, Guyane92Name};
-
-    private final static Integer FortMarigotEPSG = 2969;
-    private final static Integer SainteAnneEPSG = 2970;
-    private final static Integer MartiniqueEPSG = 2973;
-    private final static Integer ReunionEPSG = 2975;
-    private final static Integer GuyaneEPSG = 2972;
-    private final static Integer[] utmEPSGs = { FortMarigotEPSG, SainteAnneEPSG, MartiniqueEPSG, ReunionEPSG, GuyaneEPSG };
-
-    public UTM_France_DOM_ProjectionChoice() {
-        super(tr("UTM France (DOM)"), "core:utmfrancedom", utmGeodesicsNames, tr("UTM Geodesic system"));
-    }
-
-    @Override
-    protected String indexToZone(int index) {
-        return Integer.toString(index + 1);
-    }
-
-    @Override
-    protected int zoneToIndex(String zone) {
-        try {
-            return Integer.parseInt(zone) - 1;
-        } catch(NumberFormatException e) {}
-        return defaultIndex;
-    }
-
-    @Override
-    public String getProjectionName() {
-        return utmGeodesicsNames[index];
-    }
-
-    @Override
-    public String getCurrentCode() {
-        return "EPSG:" + utmEPSGs[index];
-    }
-
-    @Override
-    public String[] allCodes() {
-        String[] res = new String[utmEPSGs.length];
-        for (int i=0; i<utmEPSGs.length; ++i) {
-            res[i] = "EPSG:" + utmEPSGs[i];
-        }
-        return res;
-    }
-
-    @Override
-    public Collection<String> getPreferencesFromCode(String code) {
-        for (int i=0; i < utmEPSGs.length; i++ )
-            if (("EPSG:" + utmEPSGs[i]).equals(code))
-                return Collections.singleton(Integer.toString(i+1));
-        return null;
-    }
-
-}
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/ShortcutPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/ShortcutPreference.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/ShortcutPreference.java	(revision 6246)
@@ -41,5 +41,5 @@
         JPanel p = gui.createPreferenceTab(this);
 
-        PrefJPanel prefpanel = new PrefJPanel(new scListModel());
+        PrefJPanel prefpanel = new PrefJPanel(new ScListModel());
         p.add(prefpanel, GBC.eol().fill(GBC.BOTH));
         if (defaultFilter!=null) prefpanel.filter(defaultFilter);
@@ -56,9 +56,9 @@
 
     // Maybe move this to prefPanel? There's no need for it to be here.
-    private static class scListModel extends AbstractTableModel {
+    private static class ScListModel extends AbstractTableModel {
         private String[] columnNames = new String[]{tr("Action"), tr("Shortcut")};
         private List<Shortcut> data;
 
-        public scListModel() {
+        public ScListModel() {
             data = Shortcut.listAll();
         }
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java	(revision 6246)
@@ -204,5 +204,5 @@
             String cstring;
             if(count > 0 && !required) {
-                cstring = "0,"+String.valueOf(count);
+                cstring = "0,"+count;
             } else if(count > 0) {
                 cstring = String.valueOf(count);
@@ -1010,6 +1010,6 @@
         }
 
-        protected String getDisplayIfNull(String display) {
-            return display;
+        protected String getDisplayIfNull() {
+            return null;
         }
 
@@ -1020,5 +1020,5 @@
             String value = null;
             if (display == null) {
-                display = getDisplayIfNull(display);
+                display = getDisplayIfNull();
             }
 
@@ -1208,10 +1208,9 @@
 
         @Override
-        protected String getDisplayIfNull(String display) {
+        protected String getDisplayIfNull() {
             if (combo.isEditable())
                 return combo.getEditor().getItem().toString();
             else
-                return display;
-
+                return null;
         }
     }
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetMenu.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetMenu.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetMenu.java	(revision 6246)
@@ -31,9 +31,4 @@
                     tr("Preset group {0}", getLocaleName())));
         putValue("toolbar", "tagginggroup_" + getRawName());
-    }
-    
-    @Override
-    public void setIcon(String iconName) {
-        super.setIcon(iconName);
     }
 
Index: /trunk/src/org/openstreetmap/josm/io/GeoJSONWriter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/GeoJSONWriter.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/io/GeoJSONWriter.java	(revision 6246)
@@ -17,5 +17,5 @@
     private OsmDataLayer layer;
     private StringBuilder out;
-    private final boolean skipEmptyNodes = true;
+    private static final boolean skipEmptyNodes = true;
     private boolean insertComma = false;
 
Index: /trunk/src/org/openstreetmap/josm/io/OsmServerReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmServerReader.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/io/OsmServerReader.java	(revision 6246)
@@ -146,9 +146,8 @@
 
                 return FixEncoding(new ProgressInputStream(activeConnection, progressMonitor), encoding);
-            } catch(Exception e) {
-                if (e instanceof OsmTransferException)
-                    throw (OsmTransferException)e;
-                else
-                    throw new OsmTransferException(e);
+            } catch (OsmTransferException e) {
+                throw e;
+            } catch (Exception e) {
+                throw new OsmTransferException(e);
             }
         } finally {
Index: /trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java	(revision 6246)
@@ -305,6 +305,12 @@
                                         bytesToSkip -= nBytesRead;
                                     }
-                                    if (bytesToSkip > 0) {
-                                        audioInputStream.skip(bytesToSkip);
+                                    while (bytesToSkip > 0) {
+                                        long skippedBytes = audioInputStream.skip(bytesToSkip);
+                                        bytesToSkip -= skippedBytes;
+                                        if (skippedBytes == 0) {
+                                            // Avoid inifinite loop
+                                            Main.warn("Unable to skip bytes from audio input stream");
+                                            bytesToSkip = 0;
+                                        }
                                     }
                                     position = offset;
Index: /trunk/src/org/openstreetmap/josm/tools/Diff.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/Diff.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/tools/Diff.java	(revision 6246)
@@ -97,5 +97,5 @@
     public Diff(Object[] a,Object[] b) {
         Map<Object,Integer> h = new HashMap<Object,Integer>(a.length + b.length);
-        filevec = new file_data[] { new file_data(a,h),new file_data(b,h) };
+        filevec = new FileData[] { new FileData(a,h),new FileData(b,h) };
     }
 
@@ -123,5 +123,5 @@
                    search of the edit matrix. */
     private int fdiagoff, bdiagoff;
-    private final file_data[] filevec;
+    private final FileData[] filevec;
     private int cost;
     /** Snakes bigger than this are considered "big". */
@@ -358,6 +358,5 @@
                 filevec[0].changed_flag[1+filevec[0].realindexes[xoff++]] = true;
             }
-        } else
-        {
+        } else {
             /* Find a point of correspondence in the middle of the files.  */
 
@@ -378,7 +377,7 @@
                 compareseq (xoff, b, yoff, b - d);
                 /* This used to use f instead of b,
-           but that is incorrect!
-           It is not necessarily the case that diagonal d
-           has a snake from b to f.  */
+                   but that is incorrect!
+                   It is not necessarily the case that diagonal d
+                   has a snake from b to f.  */
                 compareseq (b, xlim, b - d, ylim);
             }
@@ -388,5 +387,4 @@
     /** Discard lines from one file that have no matches in the other file.
      */
-
     private void discard_confusing_lines() {
         filevec[0].discard_confusing_lines(filevec[1]);
@@ -397,7 +395,6 @@
 
     /** Adjust inserts/deletes of blank lines to join changes
-     as much as possible.
+        as much as possible.
      */
-
     private void shift_boundaries() {
         if (inhibit)
@@ -409,12 +406,12 @@
     public interface ScriptBuilder {
         /** Scan the tables of which lines are inserted and deleted,
-     producing an edit script.
-   @param changed0 true for lines in first file which do not match 2nd
-   @param len0 number of lines in first file
-   @param changed1 true for lines in 2nd file which do not match 1st
-   @param len1 number of lines in 2nd file
-   @return a linked list of changes - or null
+            producing an edit script.
+            @param changed0 true for lines in first file which do not match 2nd
+            @param len0 number of lines in first file
+            @param changed1 true for lines in 2nd file which do not match 1st
+            @param len1 number of lines in 2nd file
+            @return a linked list of changes - or null
          */
-        public change build_script(
+        public Change build_script(
                 boolean[] changed0,int len0,
                 boolean[] changed1,int len1
@@ -427,9 +424,9 @@
     static class ReverseScript implements ScriptBuilder {
         @Override
-        public  change build_script(
+        public  Change build_script(
                 final boolean[] changed0,int len0,
                 final boolean[] changed1,int len1)
         {
-            change script = null;
+            Change script = null;
             int i0 = 0, i1 = 0;
             while (i0 < len0 || i1 < len1) {
@@ -446,5 +443,5 @@
 
                     /* Record this change.  */
-                    script = new change(line0, line1, i0 - line0, i1 - line1, script);
+                    script = new Change(line0, line1, i0 - line0, i1 - line1, script);
                 }
 
@@ -459,11 +456,11 @@
     static class ForwardScript implements ScriptBuilder {
         /** Scan the tables of which lines are inserted and deleted,
-       producing an edit script in forward order.  */
+            producing an edit script in forward order.  */
         @Override
-        public change build_script(
+        public Change build_script(
                 final boolean[] changed0,int len0,
                 final boolean[] changed1,int len1)
         {
-            change script = null;
+            Change script = null;
             int i0 = len0, i1 = len1;
 
@@ -483,5 +480,5 @@
 
                     /* Record this change.  */
-                    script = new change(i0, i1, line0 - i0, line1 - i1, script);
+                    script = new Change(i0, i1, line0 - i0, line1 - i1, script);
                 }
 
@@ -499,7 +496,7 @@
     reverseScript = new ReverseScript();
 
-    /* Report the differences of two files.  DEPTH is the current directory
-     depth. */
-    public final change diff_2(final boolean reverse) {
+    /** Report the differences of two files.  DEPTH is the current directory
+        depth. */
+    public final Change diff_2(final boolean reverse) {
         return diff(reverse ? reverseScript : forwardScript);
     }
@@ -513,5 +510,5 @@
      @return the head of a list of changes
      */
-    public change diff(final ScriptBuilder bld) {
+    public Change diff(final ScriptBuilder bld) {
 
         /* Some lines are obviously insertions or deletions
@@ -566,7 +563,7 @@
      which the insertion was done; vice versa for INSERTED and LINE1.  */
 
-    public static class change {
+    public static class Change {
         /** Previous or next edit command. */
-        public change link;
+        public Change link;
         /** # lines of file 1 changed here.  */
         public final int inserted;
@@ -577,6 +574,4 @@
         /** Line number of 1st inserted line.  */
         public final int line1;
-        /** Change is ignorable. */
-        public boolean ignore;
 
         /** Cons an additional entry onto the front of an edit script OLD.
@@ -587,5 +582,5 @@
        If DELETED is 0 then LINE0 is the number of the line before
        which the insertion was done; vice versa for INSERTED and LINE1.  */
-        public change(int line0, int line1, int deleted, int inserted, change old) {
+        public Change(int line0, int line1, int deleted, int inserted, Change old) {
             this.line0 = line0;
             this.line1 = line1;
@@ -604,11 +599,11 @@
      */
 
-    class file_data {
+    class FileData {
 
         /** Allocate changed array for the results of comparison.  */
         void clear() {
             /* Allocate a flag for each line of each file, saying whether that line
-     is an insertion or deletion.
-     Allocate an extra element, always zero, at each end of each vector.
+               is an insertion or deletion.
+               Allocate an extra element, always zero, at each end of each vector.
              */
             changed_flag = new boolean[buffered_lines + 2];
@@ -616,5 +611,5 @@
 
         /** Return equiv_count[I] as the number of lines in this file
-       that fall in equivalence class I.
+         that fall in equivalence class I.
          @return the array of equivalence class counts.
          */
@@ -640,5 +635,5 @@
       @param f the other file
          */
-        void discard_confusing_lines(file_data f) {
+        void discard_confusing_lines(FileData f) {
             clear();
             /* Set up table of which lines are going to be discarded. */
@@ -729,18 +724,15 @@
 
                     /* Now we have the length of a run of discardable lines
-           whose first and last are not provisional.  */
+                       whose first and last are not provisional.  */
                     length = j - i;
 
                     /* If 1/4 of the lines in the run are provisional,
-           cancel discarding of all provisional lines in the run.  */
-                    if (provisional * 4 > length)
-                    {
+                       cancel discarding of all provisional lines in the run.  */
+                    if (provisional * 4 > length) {
                         while (j > i)
                             if (discards[--j] == 2) {
                                 discards[j] = 0;
                             }
-                    }
-                    else
-                    {
+                    } else {
                         int consec;
                         int minimum = 1;
@@ -817,5 +809,5 @@
 
         /** Actually discard the lines.
-      @param discards flags lines to be discarded
+            @param discards flags lines to be discarded
          */
         private void discard(final byte[] discards) {
@@ -833,5 +825,5 @@
         }
 
-        file_data(int[] data) {
+        FileData(int[] data) {
             buffered_lines = data.length;
             equivs = data;
@@ -840,5 +832,5 @@
         }
         
-        file_data(Object[] data,Map<Object,Integer> h) {
+        FileData(Object[] data,Map<Object,Integer> h) {
             this(new int[data.length]);
             // FIXME: diff 2.7 removes common prefix and common suffix
@@ -866,5 +858,5 @@
          */
 
-        void shift_boundaries(file_data f) {
+        void shift_boundaries(FileData f) {
             final boolean[] changed = changed_flag;
             final boolean[] other_changed = f.changed_flag;
@@ -909,11 +901,11 @@
 
                     /* If the first changed line matches the following unchanged one,
-         and this run does not follow right after a previous run,
-         and there are no lines deleted from the other file here,
-         then classify the first changed line as unchanged
-         and the following line as changed in its place.  */
+                       and this run does not follow right after a previous run,
+                       and there are no lines deleted from the other file here,
+                       then classify the first changed line as unchanged
+                       and the following line as changed in its place.  */
 
                     /* You might ask, how could this run follow right after another?
-         Only because the previous run was shifted here.  */
+                       Only because the previous run was shifted here.  */
 
                     if (end != i_end
@@ -929,6 +921,6 @@
                         ++i;
                         /* Since one line-that-matches is now before this run
-             instead of after, we must advance in the other file
-             to keep in synch.  */
+                           instead of after, we must advance in the other file
+                           to keep in synch.  */
                         ++j;
                     } else {
@@ -965,5 +957,4 @@
            The results of comparison are stored here.  */
         boolean[]       changed_flag;
-
     }
 }
Index: /trunk/src/org/openstreetmap/josm/tools/Geometry.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/Geometry.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/tools/Geometry.java	(revision 6246)
@@ -181,5 +181,5 @@
 
         for (int pos = 0; pos < ways.size(); pos ++) {
-            if (changedWays[pos] == false) {
+            if (!changedWays[pos]) {
                 continue;
             }
Index: /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 6246)
@@ -412,5 +412,7 @@
                                     try {
                                         return new ImageResource(ImageIO.read(new ByteArrayInputStream(bytes)));
-                                    } catch (IOException e) {}
+                                    } catch (IOException e) {
+                                        Main.warn("IOException while reading image: "+e.getMessage());
+                                    }
                                 }
                     }
@@ -522,5 +524,7 @@
                 try {
                     img = ImageIO.read(is.getFile().toURI().toURL());
-                } catch (IOException e) {}
+                } catch (IOException e) {
+                    Main.warn("IOException while reading HTTP image: "+e.getMessage());
+                }
                 return img == null ? null : new ImageResource(img);
             default:
Index: /trunk/src/org/openstreetmap/josm/tools/TextTagParser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/TextTagParser.java	(revision 6245)
+++ /trunk/src/org/openstreetmap/josm/tools/TextTagParser.java	(revision 6246)
@@ -34,6 +34,4 @@
     
     public static class TextAnalyzer {
-        int start = 0;
-        boolean keyFound = false;
         boolean quotesStarted = false;
         boolean esc = false;
@@ -42,5 +40,4 @@
         String data;
         int n;
-        boolean notFound;
 
         public TextAnalyzer(String text) {
Index: /trunk/test/unit/org/openstreetmap/josm/tools/ExifReaderTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/ExifReaderTest.java	(revision 6245)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/ExifReaderTest.java	(revision 6246)
@@ -49,5 +49,5 @@
     public void testReadOrientation() {
         Integer orientation = ExifReader.readOrientation(sampleFile);
-        assertEquals(new Integer(1), orientation);
+        assertEquals(Integer.valueOf(1), orientation);
     }
     
