Index: trunk/src/org/openstreetmap/josm/io/AbstractParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/AbstractParser.java	(revision 8388)
+++ trunk/src/org/openstreetmap/josm/io/AbstractParser.java	(revision 8390)
@@ -62,5 +62,5 @@
         Long l = 0L;
         try {
-            l = Long.parseLong(v);
+            l = Long.valueOf(v);
         } catch(NumberFormatException e) {
             throwException(tr("Illegal value for mandatory attribute ''{0}'' of type long. Got ''{1}''.", name, v), e);
Index: trunk/src/org/openstreetmap/josm/io/AllFormatsImporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/AllFormatsImporter.java	(revision 8388)
+++ trunk/src/org/openstreetmap/josm/io/AllFormatsImporter.java	(revision 8390)
@@ -13,4 +13,7 @@
  */
 public class AllFormatsImporter extends FileImporter {
+    /**
+     * Constructs a new {@code AllFormatsImporter}.
+     */
     public AllFormatsImporter() {
         super(new ExtensionFileFilter(getAllExtensions(), "", tr("All Formats")
@@ -18,5 +21,6 @@
     }
 
-    @Override public boolean acceptFile(File pathname) {
+    @Override
+    public boolean acceptFile(File pathname) {
         return false;
     }
@@ -34,6 +38,5 @@
                 continue;
             }
-            ext.append(fi.filter.getExtensions());
-            ext.append(",");
+            ext.append(fi.filter.getExtensions()).append(',');
         }
         // remove last comma
Index: trunk/src/org/openstreetmap/josm/io/CachedFile.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 8388)
+++ trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 8390)
@@ -339,6 +339,5 @@
         StringBuilder prefKey = new StringBuilder("mirror.");
         if (destDir != null) {
-            prefKey.append(destDir);
-            prefKey.append(".");
+            prefKey.append(destDir).append('.');
         }
         prefKey.append(url.toString());
@@ -375,5 +374,5 @@
                 }
                 if (cachingStrategy == CachingStrategy.IfModifiedSince) {
-                    ifModifiedSince = Long.parseLong(localPathEntry.get(0));
+                    ifModifiedSince = Long.valueOf(localPathEntry.get(0));
                 }
             }
Index: trunk/src/org/openstreetmap/josm/io/Capabilities.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/Capabilities.java	(revision 8388)
+++ trunk/src/org/openstreetmap/josm/io/Capabilities.java	(revision 8390)
@@ -101,5 +101,5 @@
         String s = get(element, attribute);
         if (s == null) return null;
-        return Double.parseDouble(s);
+        return Double.valueOf(s);
     }
 
@@ -115,5 +115,5 @@
         String s = get(element, attribute);
         if (s == null) return null;
-        return Long.parseLong(s);
+        return Long.valueOf(s);
     }
 
@@ -197,5 +197,5 @@
         if (v != null) {
             try {
-                Long n = Long.parseLong(v);
+                long n = Long.parseLong(v);
                 if (n <= 0) {
                     warnIllegalValue("waynodes", "maximum", n);
Index: trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java	(revision 8388)
+++ trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java	(revision 8390)
@@ -253,11 +253,11 @@
         StringBuilder sb = new StringBuilder();
         if (uid != null) {
-            sb.append("user").append("=").append(uid);
+            sb.append("user=").append(uid);
         } else if (userName != null) {
-            sb.append("display_name").append("=").append(Utils.encodeUrl(userName));
+            sb.append("display_name=").append(Utils.encodeUrl(userName));
         }
         if (bounds != null) {
             if (sb.length() > 0) {
-                sb.append("&");
+                sb.append('&');
             }
             sb.append("bbox=").append(bounds.encodeAsString(","));
@@ -265,25 +265,25 @@
         if (closedAfter != null && createdBefore != null) {
             if (sb.length() > 0) {
-                sb.append("&");
+                sb.append('&');
             }
             DateFormat df = DateUtils.newIsoDateTimeFormat();
-            sb.append("time").append("=").append(df.format(closedAfter));
-            sb.append(",").append(df.format(createdBefore));
+            sb.append("time=").append(df.format(closedAfter));
+            sb.append(',').append(df.format(createdBefore));
         } else if (closedAfter != null) {
             if (sb.length() > 0) {
-                sb.append("&");
+                sb.append('&');
             }
             DateFormat df = DateUtils.newIsoDateTimeFormat();
-            sb.append("time").append("=").append(df.format(closedAfter));
+            sb.append("time=").append(df.format(closedAfter));
         }
 
         if (open != null) {
             if (sb.length() > 0) {
-                sb.append("&");
+                sb.append('&');
             }
             sb.append("open=").append(Boolean.toString(open));
         } else if (closed != null) {
             if (sb.length() > 0) {
-                sb.append("&");
+                sb.append('&');
             }
             sb.append("closed=").append(Boolean.toString(closed));
@@ -291,5 +291,5 @@
             // since 2013-12-05, see https://github.com/openstreetmap/openstreetmap-website/commit/1d1f194d598e54a5d6fb4f38fb569d4138af0dc8
             if (sb.length() > 0) {
-                sb.append("&");
+                sb.append('&');
             }
             sb.append("changesets=").append(Utils.join(",", changesetIds));
Index: trunk/src/org/openstreetmap/josm/io/GpxReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/GpxReader.java	(revision 8388)
+++ trunk/src/org/openstreetmap/josm/io/GpxReader.java	(revision 8390)
@@ -397,5 +397,5 @@
                 case "pdop":
                     try {
-                        currentWayPoint.put(localName, Float.parseFloat(accumulator.toString()));
+                        currentWayPoint.put(localName, Float.valueOf(accumulator.toString()));
                     } catch(Exception e) {
                         currentWayPoint.put(localName, new Float(0));
Index: trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java	(revision 8388)
+++ trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java	(revision 8390)
@@ -256,6 +256,5 @@
 
     /**
-     * builds the Multi Get request string for a set of ids and a given
-     * {@link OsmPrimitiveType}.
+     * builds the Multi Get request string for a set of ids and a given {@link OsmPrimitiveType}.
      *
      * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY}, {@link OsmPrimitiveType#RELATION RELATION}
@@ -272,5 +271,5 @@
             sb.append(it.next());
             if (i < idPackage.size()-1) {
-                sb.append(",");
+                sb.append(',');
             }
         }
@@ -279,6 +278,5 @@
 
     /**
-     * builds the Multi Get request string for a single id and a given
-     * {@link OsmPrimitiveType}.
+     * builds the Multi Get request string for a single id and a given {@link OsmPrimitiveType}.
      *
      * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY}, {@link OsmPrimitiveType#RELATION RELATION}
Index: trunk/src/org/openstreetmap/josm/io/NMEAImporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/NMEAImporter.java	(revision 8388)
+++ trunk/src/org/openstreetmap/josm/io/NMEAImporter.java	(revision 8390)
@@ -69,10 +69,10 @@
 
     private void showNmeaInfobox(boolean success, NmeaReader r) {
-        final StringBuilder msg = new StringBuilder().append("<html>");
-        msg.append(tr("Coordinates imported: {0}", r.getNumberOfCoordinates()) + "<br>")
-           .append(tr("Malformed sentences: {0}", r.getParserMalformed()) + "<br>")
-           .append(tr("Checksum errors: {0}", r.getParserChecksumErrors()) + "<br>");
+        final StringBuilder msg = new StringBuilder(160).append("<html>");
+        msg.append(tr("Coordinates imported: {0}", r.getNumberOfCoordinates())).append("<br>")
+           .append(tr("Malformed sentences: {0}", r.getParserMalformed())).append("<br>")
+           .append(tr("Checksum errors: {0}", r.getParserChecksumErrors())).append("<br>");
         if (!success) {
-            msg.append(tr("Unknown sentences: {0}", r.getParserUnknown()) + "<br>");
+            msg.append(tr("Unknown sentences: {0}", r.getParserUnknown())).append("<br>");
         }
         msg.append(tr("Zero coordinates: {0}", r.getParserZeroCoordinates()))
Index: trunk/src/org/openstreetmap/josm/io/NmeaReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/NmeaReader.java	(revision 8388)
+++ trunk/src/org/openstreetmap/josm/io/NmeaReader.java	(revision 8390)
@@ -315,5 +315,5 @@
                 accu=e[GPGGA.HDOP.position];
                 if(!accu.isEmpty()) {
-                    currentwp.put(GpxConstants.PT_HDOP, Float.parseFloat(accu));
+                    currentwp.put(GpxConstants.PT_HDOP, Float.valueOf(accu));
                 }
                 // fix
@@ -364,15 +364,15 @@
                 accu=e[GPGSA.VDOP.position];
                 if(!accu.isEmpty()) {
-                    currentwp.put(GpxConstants.PT_VDOP, Float.parseFloat(accu));
+                    currentwp.put(GpxConstants.PT_VDOP, Float.valueOf(accu));
                 }
                 // hdop
                 accu=e[GPGSA.HDOP.position];
                 if(!accu.isEmpty()) {
-                    currentwp.put(GpxConstants.PT_HDOP, Float.parseFloat(accu));
+                    currentwp.put(GpxConstants.PT_HDOP, Float.valueOf(accu));
                 }
                 // pdop
                 accu=e[GPGSA.PDOP.position];
                 if(!accu.isEmpty()) {
-                    currentwp.put(GpxConstants.PT_PDOP, Float.parseFloat(accu));
+                    currentwp.put(GpxConstants.PT_PDOP, Float.valueOf(accu));
                 }
             } else if("$GPRMC".equals(e[0]) || "$GNRMC".equals(e[0])) {
Index: trunk/src/org/openstreetmap/josm/io/OsmApi.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmApi.java	(revision 8388)
+++ trunk/src/org/openstreetmap/josm/io/OsmApi.java	(revision 8390)
@@ -324,8 +324,7 @@
         StringBuilder rv = new StringBuilder(serverUrl);
         if (version != null) {
-            rv.append("/");
-            rv.append(version);
-        }
-        rv.append("/");
+            rv.append('/').append(version);
+        }
+        rv.append('/');
         // this works around a ruby (or lighttpd) bug where two consecutive slashes in
         // an URL will cause a "404 not found" response.
@@ -683,5 +682,5 @@
                         while((s = in.readLine()) != null) {
                             responseBody.append(s);
-                            responseBody.append("\n");
+                            responseBody.append('\n');
                         }
                     }
Index: trunk/src/org/openstreetmap/josm/io/OsmApiException.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmApiException.java	(revision 8388)
+++ trunk/src/org/openstreetmap/josm/io/OsmApiException.java	(revision 8390)
@@ -136,5 +136,5 @@
                 sb.append(", Error Header=<")
                 .append(eh)
-                .append(">");
+                .append('>');
             }
         } catch (Exception e) {
@@ -146,5 +146,5 @@
                 sb.append(", Error Body=<")
                 .append(eb)
-                .append(">");
+                .append('>');
             }
         } catch (Exception e) {
Index: trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java	(revision 8388)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java	(revision 8390)
@@ -125,5 +125,5 @@
             progressMonitor.subTask(tr("Contacting OSM Server..."));
             StringBuilder sb = new StringBuilder();
-            sb.append(primitiveType.getAPIName()).append("/").append(id).append(type);
+            sb.append(primitiveType.getAPIName()).append('/').append(id).append(type);
 
             try (InputStream in = getInputStream(sb.toString(), progressMonitor.createSubTaskMonitor(1, true))) {
Index: trunk/src/org/openstreetmap/josm/io/OsmServerHistoryReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerHistoryReader.java	(revision 8388)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerHistoryReader.java	(revision 8390)
@@ -60,5 +60,5 @@
             StringBuilder sb = new StringBuilder();
             sb.append(primitiveType.getAPIName())
-            .append("/").append(id).append("/history");
+            .append('/').append(id).append("/history");
 
             try (InputStream in = getInputStream(sb.toString(), progressMonitor.createSubTaskMonitor(1, true))) {
Index: trunk/src/org/openstreetmap/josm/io/OsmServerObjectReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerObjectReader.java	(revision 8388)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerObjectReader.java	(revision 8390)
@@ -118,10 +118,10 @@
             StringBuilder sb = new StringBuilder();
             sb.append(id.getType().getAPIName())
-              .append("/")
+              .append('/')
               .append(id.getUniqueId());
             if (full && ! id.getType().equals(OsmPrimitiveType.NODE)) {
                 sb.append("/full");
             } else if (version > 0) {
-                sb.append("/").append(version);
+                sb.append('/').append(version);
             }
 
Index: trunk/src/org/openstreetmap/josm/io/OsmServerReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerReader.java	(revision 8388)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerReader.java	(revision 8390)
@@ -184,5 +184,5 @@
                             while((s = in.readLine()) != null) {
                                 errorBody.append(s);
-                                errorBody.append("\n");
+                                errorBody.append('\n');
                             }
                         }
Index: trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java	(revision 8388)
+++ trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java	(revision 8390)
@@ -263,5 +263,5 @@
                     Integer val = null;
                     try {
-                        val = Integer.parseInt(accumulator.toString());
+                        val = Integer.valueOf(accumulator.toString());
                     } catch(NumberFormatException e) {
                         val = null;
@@ -304,5 +304,5 @@
                     Integer tileSize = null;
                     try {
-                        tileSize  = Integer.parseInt(accumulator.toString());
+                        tileSize = Integer.valueOf(accumulator.toString());
                     } catch(NumberFormatException e) {
                         tileSize = null;
Index: trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java	(revision 8388)
+++ trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java	(revision 8390)
@@ -81,16 +81,13 @@
         }
         StringBuilder a = new StringBuilder(serviceUrl.getProtocol());
-        a.append("://")
-         .append(serviceUrl.getHost());
+        a.append("://").append(serviceUrl.getHost());
         if (serviceUrl.getPort() != -1) {
-            a.append(":")
-             .append(serviceUrl.getPort());
-        }
-        a.append(serviceUrl.getPath())
-         .append("?");
+            a.append(':').append(serviceUrl.getPort());
+        }
+        a.append(serviceUrl.getPath()).append('?');
         if (serviceUrl.getQuery() != null) {
             a.append(serviceUrl.getQuery());
             if (!serviceUrl.getQuery().isEmpty() && !serviceUrl.getQuery().endsWith("&")) {
-                a.append("&");
+                a.append('&');
             }
         }
@@ -150,5 +147,5 @@
             while ((line = br.readLine()) != null) {
                 ba.append(line);
-                ba.append("\n");
+                ba.append('\n');
             }
         }
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java	(revision 8388)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java	(revision 8390)
@@ -369,5 +369,5 @@
         StringBuilder r = new StringBuilder();
         boolean first = true;
-        r.append("[");
+        r.append('[');
 
         for (Entry<String, Class<? extends RequestHandler>> p : handlers.entrySet()) {
@@ -379,5 +379,5 @@
             r.append(getHandlerInfoAsJSON(p.getKey()));
         }
-        r.append("]");
+        r.append(']');
 
         return r.toString();
@@ -454,6 +454,7 @@
      * Reports HTML message with the description of all available commands
      * @return HTML message with the description of all available commands
-     * @throws IllegalAccessException
-     * @throws InstantiationException
+     * @throws IllegalAccessException if one handler class or its nullary constructor is not accessible.
+     * @throws InstantiationException if one handler class represents an abstract class, an interface, an array class,
+     * a primitive type, or void; or if the class has no nullary constructor; or if the instantiation fails for some other reason.
      */
     public static String getUsageAsHtml() throws IllegalAccessException, InstantiationException {
@@ -464,6 +465,6 @@
             String[] optional = sample.getOptionalParams();
             String[] examples = sample.getUsageExamples(handler.getKey().substring(1));
-            usage.append("<li>");
-            usage.append(handler.getKey());
+            usage.append("<li>")
+                 .append(handler.getKey());
             if (sample.getUsage() != null && !sample.getUsage().isEmpty()) {
                 usage.append(" &mdash; <i>").append(sample.getUsage()).append("</i>");
@@ -478,5 +479,5 @@
                 usage.append("<br/>examples: ");
                 for (String ex: examples) {
-                    usage.append("<br/> <a href=\"http://localhost:8111"+ex+"\">"+ex+"</a>");
+                    usage.append("<br/> <a href=\"http://localhost:8111").append(ex).append("\">").append(ex).append("</a>");
                 }
             }
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/FeaturesHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/FeaturesHandler.java	(revision 8388)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/FeaturesHandler.java	(revision 8390)
@@ -2,7 +2,7 @@
 package org.openstreetmap.josm.io.remotecontrol.handler;
 
-import org.openstreetmap.josm.Main;
 import static org.openstreetmap.josm.tools.I18n.tr;
 
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.io.remotecontrol.PermissionPrefWithDefault;
 import org.openstreetmap.josm.io.remotecontrol.RequestProcessor;
@@ -25,5 +25,5 @@
         String q=args.get("q");
         if (q!=null) {
-            buf.append("[");
+            buf.append('[');
             boolean first = true;
             for (String s: q.split("[,\\s]+")) {
@@ -40,9 +40,9 @@
                }
             }
-            buf.append("]");
+            buf.append(']');
         } else {
             buf.append(RequestProcessor.getHandlersInfoAsJSON());
         }
-            
+
         content = buf.toString();
         contentType = "application/json";
@@ -66,5 +66,5 @@
         return null;
     }
-    
+
     @Override
     public String[] getOptionalParams() {
@@ -84,5 +84,5 @@
     @Override
     public String[] getUsageExamples() {
-        return new String[] {"/features", "/features?q=import,add_node"}; 
+        return new String[] {"/features", "/features?q=import,add_node"};
     }
 }
Index: trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionImporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionImporter.java	(revision 8388)
+++ trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionImporter.java	(revision 8390)
@@ -55,8 +55,8 @@
                                     break;
                                 case "speed":
-                                    entry.setSpeed(Double.parseDouble(attrElem.getTextContent()));
+                                    entry.setSpeed(Double.valueOf(attrElem.getTextContent()));
                                     break;
                                 case "elevation":
-                                    entry.setElevation(Double.parseDouble(attrElem.getTextContent()));
+                                    entry.setElevation(Double.valueOf(attrElem.getTextContent()));
                                     break;
                                 case "gps-time":
@@ -64,5 +64,5 @@
                                     break;
                                 case "exif-orientation":
-                                    entry.setExifOrientation(Integer.parseInt(attrElem.getTextContent()));
+                                    entry.setExifOrientation(Integer.valueOf(attrElem.getTextContent()));
                                     break;
                                 case "exif-time":
Index: trunk/src/org/openstreetmap/josm/io/session/SessionReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/SessionReader.java	(revision 8388)
+++ trunk/src/org/openstreetmap/josm/io/session/SessionReader.java	(revision 8390)
@@ -362,5 +362,5 @@
                     Integer idx = null;
                     try {
-                        idx = Integer.parseInt(e.getAttribute("index"));
+                        idx = Integer.valueOf(e.getAttribute("index"));
                     } catch (NumberFormatException ex) {
                         Main.warn(ex);
@@ -380,5 +380,5 @@
                             Integer d = null;
                             try {
-                                d = Integer.parseInt(sd);
+                                d = Integer.valueOf(sd);
                             } catch (NumberFormatException ex) {
                                 Main.warn(ex);
