Index: trunk/src/org/openstreetmap/josm/actions/DownloadAlongAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/DownloadAlongAction.java	(revision 6986)
+++ trunk/src/org/openstreetmap/josm/actions/DownloadAlongAction.java	(revision 6987)
@@ -45,5 +45,5 @@
     }
     
-    protected static void addToDownload(Area a, Rectangle2D r, Collection<Rectangle2D> results, double max_area) {
+    protected static void addToDownload(Area a, Rectangle2D r, Collection<Rectangle2D> results, double maxArea) {
         Area tmp = new Area(r);
         // intersect with sought-after area
@@ -53,5 +53,5 @@
         }
         Rectangle2D bounds = tmp.getBounds2D();
-        if (bounds.getWidth() * bounds.getHeight() > max_area) {
+        if (bounds.getWidth() * bounds.getHeight() > maxArea) {
             // the rectangle gets too large; split it and make recursive call.
             Rectangle2D r1;
@@ -68,6 +68,6 @@
                         bounds.getHeight() / 2);
             }
-            addToDownload(a, r1, results, max_area);
-            addToDownload(a, r2, results, max_area);
+            addToDownload(a, r1, results, maxArea);
+            addToDownload(a, r2, results, maxArea);
         } else {
             results.add(bounds);
@@ -92,7 +92,7 @@
      * the areas if applicable.
      */
-    protected static void confirmAndDownloadAreas(Area a, double max_area, boolean osmDownload, boolean gpxDownload, String title, ProgressMonitor progressMonitor) {
+    protected static void confirmAndDownloadAreas(Area a, double maxArea, boolean osmDownload, boolean gpxDownload, String title, ProgressMonitor progressMonitor) {
         List<Rectangle2D> toDownload = new ArrayList<Rectangle2D>();
-        addToDownload(a, a.getBounds(), toDownload, max_area);
+        addToDownload(a, a.getBounds(), toDownload, maxArea);
         if (toDownload.isEmpty()) {
             return;
Index: trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java	(revision 6986)
+++ trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java	(revision 6987)
@@ -112,7 +112,7 @@
         public boolean insideToTheRight;
 
-        public WayInPolygon(Way _way, boolean _insideRight) {
-            this.way = _way;
-            this.insideToTheRight = _insideRight;
+        public WayInPolygon(Way way, boolean insideRight) {
+            this.way = way;
+            this.insideToTheRight = insideRight;
         }
 
@@ -289,7 +289,7 @@
         public final AssembledMultipolygon pol;
 
-        public PolygonLevel(AssembledMultipolygon _pol, int _level) {
-            pol = _pol;
-            level = _level;
+        public PolygonLevel(AssembledMultipolygon pol, int level) {
+            this.pol = pol;
+            this.level = level;
         }
     }
Index: trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 6986)
+++ trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 6987)
@@ -518,5 +518,5 @@
      * Class contains some auxiliary functions
      */
-    private static class EN {
+    private static final class EN {
         private EN() {
             // Hide implicit public constructor for utility class
Index: trunk/src/org/openstreetmap/josm/actions/upload/CyclicUploadDependencyException.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/upload/CyclicUploadDependencyException.java	(revision 6986)
+++ trunk/src/org/openstreetmap/josm/actions/upload/CyclicUploadDependencyException.java	(revision 6987)
@@ -11,8 +11,7 @@
 
 public class CyclicUploadDependencyException extends Exception {
-    private Stack<Relation> cycle;
+    private final Stack<Relation> cycle;
 
     public CyclicUploadDependencyException(Stack<Relation> cycle) {
-        super();
         this.cycle = cycle;
     }
Index: trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java
===================================================================
--- trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java	(revision 6986)
+++ trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java	(revision 6987)
@@ -92,5 +92,5 @@
      * @since 5787
      */
-    public static class TagSwitcher {
+    public static final class TagSwitcher {
 
         private TagSwitcher() {
Index: trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java	(revision 6986)
+++ trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java	(revision 6987)
@@ -739,5 +739,5 @@
      * Also contains functions that convert preferences object to JavaScript object and back
      */
-    public static class PreferencesUtils {
+    public static final class PreferencesUtils {
 
         private PreferencesUtils() {
Index: trunk/src/org/openstreetmap/josm/data/osm/DataIntegrityProblemException.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/DataIntegrityProblemException.java	(revision 6986)
+++ trunk/src/org/openstreetmap/josm/data/osm/DataIntegrityProblemException.java	(revision 6987)
@@ -4,8 +4,8 @@
 public class DataIntegrityProblemException extends RuntimeException {
 
-    private String htmlMessage;
+    private final String htmlMessage;
 
     public DataIntegrityProblemException(String message) {
-        super(message);
+        this(message, null);
     }
 
Index: trunk/src/org/openstreetmap/josm/data/projection/Ellipsoid.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/Ellipsoid.java	(revision 6986)
+++ trunk/src/org/openstreetmap/josm/data/projection/Ellipsoid.java	(revision 6987)
@@ -237,19 +237,20 @@
      * convert cartesian coordinates to ellipsoidal coordinates
      *
-     * @param XYZ the coordinates in meters (X, Y, Z)
+     * @param xyz the coordinates in meters (X, Y, Z)
      * @return The corresponding latitude and longitude in degrees
      */
-    public LatLon cart2LatLon(double[] XYZ) {
-        return cart2LatLon(XYZ, 1e-11);
-    }
-    public LatLon cart2LatLon(double[] XYZ, double epsilon) {
-        double norm = Math.sqrt(XYZ[0] * XYZ[0] + XYZ[1] * XYZ[1]);
-        double lg = 2.0 * Math.atan(XYZ[1] / (XYZ[0] + norm));
-        double lt = Math.atan(XYZ[2] / (norm * (1.0 - (a * e2 / Math.sqrt(XYZ[0] * XYZ[0] + XYZ[1] * XYZ[1] + XYZ[2] * XYZ[2])))));
+    public LatLon cart2LatLon(double[] xyz) {
+        return cart2LatLon(xyz, 1e-11);
+    }
+
+    public LatLon cart2LatLon(double[] xyz, double epsilon) {
+        double norm = Math.sqrt(xyz[0] * xyz[0] + xyz[1] * xyz[1]);
+        double lg = 2.0 * Math.atan(xyz[1] / (xyz[0] + norm));
+        double lt = Math.atan(xyz[2] / (norm * (1.0 - (a * e2 / Math.sqrt(xyz[0] * xyz[0] + xyz[1] * xyz[1] + xyz[2] * xyz[2])))));
         double delta = 1.0;
         while (delta > epsilon) {
             double s2 = Math.sin(lt);
             s2 *= s2;
-            double l = Math.atan((XYZ[2] / norm)
+            double l = Math.atan((xyz[2] / norm)
                     / (1.0 - (a * e2 * Math.cos(lt) / (norm * Math.sqrt(1.0 - e2 * s2)))));
             delta = Math.abs(l - lt);
@@ -270,10 +271,10 @@
 
         double Rn = a / Math.sqrt(1 - e2 * Math.pow(Math.sin(phi), 2));
-        double[] XYZ = new double[3];
-        XYZ[0] = Rn * Math.cos(phi) * Math.cos(lambda);
-        XYZ[1] = Rn * Math.cos(phi) * Math.sin(lambda);
-        XYZ[2] = Rn * (1 - e2) * Math.sin(phi);
-
-        return XYZ;
+        double[] xyz = new double[3];
+        xyz[0] = Rn * Math.cos(phi) * Math.cos(lambda);
+        xyz[1] = Rn * Math.cos(phi) * Math.sin(lambda);
+        xyz[2] = Rn * (1 - e2) * Math.sin(phi);
+
+        return xyz;
     }
 }
Index: trunk/src/org/openstreetmap/josm/gui/MenuScroller.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MenuScroller.java	(revision 6986)
+++ trunk/src/org/openstreetmap/josm/gui/MenuScroller.java	(revision 6987)
@@ -439,4 +439,5 @@
     protected void finalize() throws Throwable {
         dispose();
+        super.finalize();
     }
 
@@ -566,5 +567,5 @@
         UP(9, 1, 9),
         DOWN(1, 9, 1);
-        static final int[] xPoints = {1, 5, 9};
+        static final int[] XPOINTS = {1, 5, 9};
         final int[] yPoints;
 
@@ -578,8 +579,8 @@
             Graphics g2 = g.create(size.width / 2 - 5, size.height / 2 - 5, 10, 10);
             g2.setColor(Color.GRAY);
-            g2.drawPolygon(xPoints, yPoints, 3);
+            g2.drawPolygon(XPOINTS, yPoints, 3);
             if (c.isEnabled()) {
                 g2.setColor(Color.BLACK);
-                g2.fillPolygon(xPoints, yPoints, 3);
+                g2.fillPolygon(XPOINTS, yPoints, 3);
             }
             g2.dispose();
Index: trunk/src/org/openstreetmap/josm/gui/help/HelpContentReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/help/HelpContentReader.java	(revision 6986)
+++ trunk/src/org/openstreetmap/josm/gui/help/HelpContentReader.java	(revision 6987)
@@ -43,5 +43,5 @@
     public String fetchHelpTopicContent(String helpTopicUrl, boolean dotest) throws HelpContentReaderException {
         if(helpTopicUrl == null)
-            throw new MissingHelpContentException();
+            throw new MissingHelpContentException(helpTopicUrl);
         HttpURLConnection con = null;
         BufferedReader in = null;
@@ -90,5 +90,5 @@
         }
         if(dotest && s.isEmpty())
-            throw new MissingHelpContentException();
+            throw new MissingHelpContentException(s);
         return s;
     }
Index: trunk/src/org/openstreetmap/josm/gui/help/HelpContentReaderException.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/help/HelpContentReaderException.java	(revision 6986)
+++ trunk/src/org/openstreetmap/josm/gui/help/HelpContentReaderException.java	(revision 6987)
@@ -4,8 +4,4 @@
 public class HelpContentReaderException extends Exception {
     private int responseCode;
-
-    public HelpContentReaderException() {
-        super();
-    }
 
     public HelpContentReaderException(String message, Throwable cause) {
@@ -39,4 +35,3 @@
         this.responseCode = responseCode;
     }
-
 }
Index: trunk/src/org/openstreetmap/josm/gui/help/MissingHelpContentException.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/help/MissingHelpContentException.java	(revision 6986)
+++ trunk/src/org/openstreetmap/josm/gui/help/MissingHelpContentException.java	(revision 6987)
@@ -3,8 +3,4 @@
 
 public class MissingHelpContentException extends HelpContentReaderException {
-
-    public MissingHelpContentException() {
-        super();
-    }
 
     public MissingHelpContentException(String message, Throwable cause) {
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSException.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSException.java	(revision 6986)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSException.java	(revision 6987)
@@ -4,5 +4,5 @@
 public class MapCSSException extends RuntimeException {
 
-    protected String specialmessage;
+    protected final String specialmessage;
     protected Integer line;
     protected Integer column;
Index: trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java	(revision 6986)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java	(revision 6987)
@@ -148,9 +148,9 @@
         } catch(OAuthCommunicationException e){
             if (canceled)
-                throw new OsmTransferCanceledException();
+                throw new OsmTransferCanceledException(e);
             throw new OsmOAuthAuthorizationException(e);
         } catch(OAuthException e){
             if (canceled)
-                throw new OsmTransferCanceledException();
+                throw new OsmTransferCanceledException(e);
             throw new OsmOAuthAuthorizationException(e);
         } finally {
@@ -182,9 +182,9 @@
         } catch(OAuthCommunicationException e){
             if (canceled)
-                throw new OsmTransferCanceledException();
+                throw new OsmTransferCanceledException(e);
             throw new OsmOAuthAuthorizationException(e);
         } catch(OAuthException e){
             if (canceled)
-                throw new OsmTransferCanceledException();
+                throw new OsmTransferCanceledException(e);
             throw new OsmOAuthAuthorizationException(e);
         } finally {
@@ -569,5 +569,5 @@
         } catch(OsmOAuthAuthorizationException e) {
             if (canceled)
-                throw new OsmTransferCanceledException();
+                throw new OsmTransferCanceledException(e);
             throw e;
         } finally {
Index: trunk/src/org/openstreetmap/josm/io/OsmTransferCanceledException.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmTransferCanceledException.java	(revision 6986)
+++ trunk/src/org/openstreetmap/josm/io/OsmTransferCanceledException.java	(revision 6987)
@@ -7,3 +7,18 @@
 public class OsmTransferCanceledException extends OsmTransferException {
 
+    /**
+     * Constructs a new {@code OsmTransferCanceledException}, without root cause.
+     */
+    public OsmTransferCanceledException() {
+        
+    }
+
+    /**
+     * Constructs a new {@code OsmTransferCanceledException}, with given root cause.
+     * @param cause the cause (which is saved for later retrieval by the {@link #getCause} method).
+     *              A <tt>null</tt> value is permitted, and indicates that the cause is nonexistent or unknown.
+     */
+    public OsmTransferCanceledException(Throwable cause) {
+        super(cause);
+    }
 }
Index: trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 6986)
+++ trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 6987)
@@ -457,15 +457,15 @@
                     }
 
-                    String full_name = subdir + name + ext;
-                    String cache_name = full_name;
+                    String fullName = subdir + name + ext;
+                    String cacheName = fullName;
                     /* cache separately */
                     if (dirs != null && !dirs.isEmpty()) {
-                        cache_name = "id:" + id + ":" + full_name;
+                        cacheName = "id:" + id + ":" + fullName;
                         if(archive != null) {
-                            cache_name += ":" + archive.getName();
+                            cacheName += ":" + archive.getName();
                         }
                     }
 
-                    ImageResource ir = cache.get(cache_name);
+                    ImageResource ir = cache.get(cacheName);
                     if (ir != null) return ir;
 
@@ -473,7 +473,7 @@
                     case ARCHIVE:
                         if (archive != null) {
-                            ir = getIfAvailableZip(full_name, archive, inArchiveDir, type);
+                            ir = getIfAvailableZip(fullName, archive, inArchiveDir, type);
                             if (ir != null) {
-                                cache.put(cache_name, ir);
+                                cache.put(cacheName, ir);
                                 return ir;
                             }
@@ -486,5 +486,5 @@
                         // and don't bother to create a URL unless we're actually
                         // creating the image.
-                        URL path = getImageUrl(full_name, dirs, additionalClassLoaders);
+                        URL path = getImageUrl(fullName, dirs, additionalClassLoaders);
                         if (path == null) {
                             continue;
@@ -492,5 +492,5 @@
                         ir = getIfAvailableLocalURL(path, type);
                         if (ir != null) {
-                            cache.put(cache_name, ir);
+                            cache.put(cacheName, ir);
                             return ir;
                         }
@@ -602,8 +602,7 @@
     }
 
-    private static ImageResource getIfAvailableZip(String full_name, File archive, String inArchiveDir, ImageType type) {
+    private static ImageResource getIfAvailableZip(String fullName, File archive, String inArchiveDir, ImageType type) {
         ZipFile zipFile = null;
-        try
-        {
+        try {
             zipFile = new ZipFile(archive);
             if (inArchiveDir == null || inArchiveDir.equals(".")) {
@@ -612,6 +611,6 @@
                 inArchiveDir += "/";
             }
-            String entry_name = inArchiveDir + full_name;
-            ZipEntry entry = zipFile.getEntry(entry_name);
+            String entryName = inArchiveDir + fullName;
+            ZipEntry entry = zipFile.getEntry(entryName);
             if(entry != null)
             {
@@ -624,5 +623,5 @@
                     switch (type) {
                     case SVG:
-                        URI uri = getSvgUniverse().loadSVG(is, entry_name);
+                        URI uri = getSvgUniverse().loadSVG(is, entryName);
                         SVGDiagram svg = getSvgUniverse().getDiagram(uri);
                         return svg == null ? null : new ImageResource(svg);
@@ -755,5 +754,5 @@
         /** Quit parsing, when a certain condition is met */
         class SAXReturnException extends SAXException {
-            private String result;
+            private final String result;
 
             public SAXReturnException(String result) {
