Index: trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java	(revision 18327)
+++ trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java	(revision 18332)
@@ -248,5 +248,5 @@
 
         protected void alertFilesWithUnknownImporter(Collection<File> files) {
-            final StringBuilder msg = new StringBuilder(128).append("<html>").append(
+            final StringBuilder msg = new StringBuilder(115 + 30 * files.size()).append("<html>").append(
                     trn("Cannot open {0} file because file does not exist or no suitable file importer is available.",
                         "Cannot open {0} files because files do not exist or no suitable file importer is available.",
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java	(revision 18327)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java	(revision 18332)
@@ -264,11 +264,11 @@
             }
         } else {
-            if (mode == Mode.translate)
+            if (mode == Mode.translate) {
                 rv = new StringBuilder(tr("Move a segment along its normal, then release the mouse button."));
-            else if (mode == Mode.translate_node)
+            } else if (mode == Mode.translate_node) {
                 rv = new StringBuilder(tr("Move the node along one of the segments, then release the mouse button."));
-            else if (mode == Mode.extrude || mode == Mode.create_new)
+            } else if (mode == Mode.extrude || mode == Mode.create_new) {
                 rv = new StringBuilder(tr("Draw a rectangle of the desired size, then release the mouse button."));
-            else {
+            } else {
                 Logging.warn("Extrude: unknown mode " + mode);
                 rv = new StringBuilder();
Index: trunk/src/org/openstreetmap/josm/data/osm/DefaultNameFormatter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/DefaultNameFormatter.java	(revision 18327)
+++ trunk/src/org/openstreetmap/josm/data/osm/DefaultNameFormatter.java	(revision 18332)
@@ -566,10 +566,13 @@
         }
         if (sb.length() == 0) {
-            sb.append(
-                    way.hasKey("highway") ? tr("highway") :
-                    way.hasKey("railway") ? tr("railway") :
-                    way.hasKey("waterway") ? tr("waterway") :
-                    way.hasKey("landuse") ? tr("landuse") : ""
-                    );
+            if (way.hasKey("highway")) {
+                sb.append(tr("highway"));
+            } else if (way.hasKey("railway")) {
+                sb.append("railway");
+            } else if (way.hasKey("waterway")) {
+                sb.append(tr("waterway"));
+            } else if (way.hasKey("landuse")) {
+                sb.append(tr("landuse"));
+            }
         }
 
@@ -581,5 +584,9 @@
         /* note: length == 0 should no longer happen, but leave the bracket code
            nevertheless, who knows what future brings */
-        sb.append((sb.length() > 0) ? (" ("+nodes+')') : nodes);
+        if (sb.length() > 0) {
+            sb.append(" (").append(nodes).append(')');
+        } else {
+            sb.append(nodes);
+        }
         decorateNameWithId(sb, way);
         return sb.toString();
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRenderer.java	(revision 18327)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRenderer.java	(revision 18332)
@@ -183,5 +183,5 @@
 
     /**
-     * Reads all the settings from preferences. Calls the @{link #getColors}
+     * Reads all the settings from preferences. Calls the {@link #getColors}
      * function.
      *
Index: trunk/src/org/openstreetmap/josm/data/validation/routines/DomainValidator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/routines/DomainValidator.java	(revision 18327)
+++ trunk/src/org/openstreetmap/josm/data/validation/routines/DomainValidator.java	(revision 18332)
@@ -1991,5 +1991,5 @@
             char lastChar = input.charAt(length-1); // fetch original last char
             switch(lastChar) {
-                case '\u002E': // "." full stop
+                case '.':      // "." full stop, AKA U+002E
                 case '\u3002': // ideographic full stop
                 case '\uFF0E': // fullwidth full stop
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/Addresses.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/Addresses.java	(revision 18327)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/Addresses.java	(revision 18332)
@@ -364,5 +364,5 @@
         LatLon centerA = a.getBBox().getCenter();
         LatLon centerB = b.getBBox().getCenter();
-        return (centerA.greatCircleDistance(centerB));
+        return centerA.greatCircleDistance(centerB);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 18327)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 18332)
@@ -575,5 +575,5 @@
 
     /**
-     * Update selection status, call @{link #selectionChanged} function.
+     * Update selection status, call {@link #selectionChanged} function.
      */
     private void updateSelection() {
Index: trunk/src/org/openstreetmap/josm/io/ozi/OziWptReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/ozi/OziWptReader.java	(revision 18327)
+++ trunk/src/org/openstreetmap/josm/io/ozi/OziWptReader.java	(revision 18332)
@@ -74,5 +74,5 @@
                     } else {
                         try {
-                            String[] fields = line.split(",");
+                            String[] fields = line.split(",", -1);
                             WayPoint currentwp = new WayPoint(new LatLon(
                                     Double.parseDouble(fields[IDX_LAT]),
Index: trunk/src/org/openstreetmap/josm/tools/HttpClient.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/HttpClient.java	(revision 18327)
+++ trunk/src/org/openstreetmap/josm/tools/HttpClient.java	(revision 18332)
@@ -379,13 +379,14 @@
          * @see HttpURLConnection#getErrorStream()
          */
-        @SuppressWarnings("resource")
+        @SuppressWarnings({"resource",
+                /* All 4 `InputStream in` reassignments would close the original when the returned stream is closed */
+                "PMD.CloseResource"})
         public final InputStream getContent() throws IOException {
-            InputStream in = getInputStream();
-            in = new ProgressInputStream(in, getContentLength(), monitor);
-            in = "gzip".equalsIgnoreCase(getContentEncoding())
-                    ? new GZIPInputStream(in)
-                    : "deflate".equalsIgnoreCase(getContentEncoding())
-                    ? new InflaterInputStream(in)
-                    : in;
+            InputStream in = new ProgressInputStream(getInputStream(), getContentLength(), monitor);
+            if ("gzip".equalsIgnoreCase(getContentEncoding())) {
+                in = new GZIPInputStream(in);
+            } else if ("deflate".equalsIgnoreCase(getContentEncoding())) {
+                in = new InflaterInputStream(in);
+            }
             Compression compression = Compression.NONE;
             if (uncompress) {
