Index: org/openstreetmap/josm/actions/CombineWayAction.java
===================================================================
--- org/openstreetmap/josm/actions/CombineWayAction.java	(revision 6082)
+++ org/openstreetmap/josm/actions/CombineWayAction.java	(working copy)
@@ -296,11 +296,11 @@
         @Override
         public String toString() {
             return new StringBuilder()
-            .append("[")
+            .append('[')
             .append(a.getId())
-            .append(",")
+            .append(',')
             .append(b.getId())
-            .append("]")
+            .append(']')
             .toString();
         }
 
Index: org/openstreetmap/josm/actions/CopyAction.java
===================================================================
--- org/openstreetmap/josm/actions/CopyAction.java	(revision 6082)
+++ org/openstreetmap/josm/actions/CopyAction.java	(working copy)
@@ -50,7 +50,7 @@
         /* copy ids to the clipboard */
         StringBuilder idsBuilder = new StringBuilder();
         for (OsmPrimitive p : primitives) {
-            idsBuilder.append(p.getId()).append(",");
+            idsBuilder.append(p.getId()).append(',');
         }
         String ids = idsBuilder.substring(0, idsBuilder.length() - 1);
         Utils.copyToClipboard(ids);
Index: org/openstreetmap/josm/actions/CopyCoordinatesAction.java
===================================================================
--- org/openstreetmap/josm/actions/CopyCoordinatesAction.java	(revision 6082)
+++ org/openstreetmap/josm/actions/CopyCoordinatesAction.java	(working copy)
@@ -31,7 +31,7 @@
             s.append(n.getCoor().lat());
             s.append(", ");
             s.append(n.getCoor().lon());
-            s.append("\n");
+            s.append('\n');
         }
         Utils.copyToClipboard(s.toString().trim());
     }
Index: org/openstreetmap/josm/actions/ExtensionFileFilter.java
===================================================================
--- org/openstreetmap/josm/actions/ExtensionFileFilter.java	(revision 6082)
+++ org/openstreetmap/josm/actions/ExtensionFileFilter.java	(working copy)
@@ -249,7 +249,7 @@
     public boolean acceptName(String filename) {
         String name = filename.toLowerCase();
         for (String ext : extensions.split(","))
-            if (name.endsWith("."+ext))
+            if (name.endsWith('.' +ext))
                 return true;
         return false;
     }
Index: org/openstreetmap/josm/actions/HistoryInfoWebAction.java
===================================================================
--- org/openstreetmap/josm/actions/HistoryInfoWebAction.java	(revision 6082)
+++ org/openstreetmap/josm/actions/HistoryInfoWebAction.java	(working copy)
@@ -24,6 +24,6 @@
     @Override
     protected  String createInfoUrl(Object infoObject) {
         OsmPrimitive primitive = (OsmPrimitive) infoObject;
-        return getBaseBrowseUrl() + "/" + OsmPrimitiveType.from(primitive).getAPIName() + "/" + primitive.getId() + "/history";
+        return getBaseBrowseUrl() + '/' + OsmPrimitiveType.from(primitive).getAPIName() + '/' + primitive.getId() + "/history";
     }
 }
Index: org/openstreetmap/josm/actions/ImageryAdjustAction.java
===================================================================
--- org/openstreetmap/josm/actions/ImageryAdjustAction.java	(revision 6082)
+++ org/openstreetmap/josm/actions/ImageryAdjustAction.java	(working copy)
@@ -216,7 +216,7 @@
             int precision = Main.getProjection().getDefaultZoomInPPD() >= 1.0 ? 2 : 7;
             // US locale to force decimal separator to be '.'
             tOffset.setText(new java.util.Formatter(java.util.Locale.US).format(
-                    "%1." + precision + "f; %1." + precision + "f",
+                    "%1." + precision + "f; %1." + precision + 'f',
                     layer.getDx(), layer.getDy()).toString());
         }
 
@@ -237,7 +237,7 @@
 
         @Override
         protected void buttonAction(int buttonIndex, ActionEvent evt) {
-            if (buttonIndex == 0 && tBookmarkName.getText() != null && !"".equals(tBookmarkName.getText()) &&
+            if (buttonIndex == 0 && tBookmarkName.getText() != null && tBookmarkName.getText() != null && !tBookmarkName.getText().isEmpty() &&
                     OffsetBookmark.getBookmarkByName(layer, tBookmarkName.getText()) != null) {
                 if (!confirmOverwriteBookmark()) return;
             }
@@ -251,7 +251,7 @@
             offsetDialog = null;
             if (getValue() != 1) {
                 layer.setOffset(oldDx, oldDy);
-            } else if (tBookmarkName.getText() != null && !"".equals(tBookmarkName.getText())) {
+            } else if (tBookmarkName.getText() != null && tBookmarkName.getText() != null && !tBookmarkName.getText().isEmpty()) {
                 OffsetBookmark.bookmarkOffset(tBookmarkName.getText(), layer);
             }
             Main.main.menu.imageryMenu.refreshOffsetMenu();
Index: org/openstreetmap/josm/actions/InfoWebAction.java
===================================================================
--- org/openstreetmap/josm/actions/InfoWebAction.java	(revision 6082)
+++ org/openstreetmap/josm/actions/InfoWebAction.java	(working copy)
@@ -24,6 +24,6 @@
     @Override
     protected  String createInfoUrl(Object infoObject) {
         OsmPrimitive primitive = (OsmPrimitive)infoObject;
-        return getBaseBrowseUrl() + "/" + OsmPrimitiveType.from(primitive).getAPIName() + "/" + primitive.getId();
+        return getBaseBrowseUrl() + '/' + OsmPrimitiveType.from(primitive).getAPIName() + '/' + primitive.getId();
     }
 }
Index: org/openstreetmap/josm/actions/Map_Rectifier_WMSmenuAction.java
===================================================================
--- org/openstreetmap/josm/actions/Map_Rectifier_WMSmenuAction.java	(revision 6082)
+++ org/openstreetmap/josm/actions/Map_Rectifier_WMSmenuAction.java	(working copy)
@@ -125,14 +125,14 @@
             // 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.equals("") && tfWmsUrl.getText().equals("")
+            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.equals("")) {
+            if(!s.url.isEmpty()) {
                 panel.add(serviceBtn, GBC.std());
                 panel.add(new UrlLabel(s.url, tr("Visit Homepage")), GBC.eol().anchor(GridBagConstraints.EAST));
             } else {
@@ -141,7 +141,7 @@
         }
 
         // Fallback in case no match was found
-        if(tfWmsUrl.getText().equals("") && firstBtn != null) {
+        if(tfWmsUrl.getText().isEmpty() && firstBtn != null) {
             firstBtn.setSelected(true);
         }
 
@@ -174,8 +174,8 @@
 
                 // We've reached the custom WMS URL service
                 // Just set the URL and hope everything works out
-                if(s.wmsUrl.equals("")) {
-                    addWMSLayer(s.name + " (" + text + ")", text);
+                if(s.wmsUrl.isEmpty()) {
+                    addWMSLayer(s.name + " (" + text + ')', text);
                     break outer;
                 }
 
@@ -184,14 +184,14 @@
                 if(m.find()) {
                     String id = m.group(1);
                     String newURL = s.wmsUrl.replaceAll("__s__", id);
-                    String title = s.name + " (" + 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 + ")";
+                    String title = s.name + " (" + text + ')';
                     addWMSLayer(title, newURL);
                     break outer;
                 }
Index: org/openstreetmap/josm/actions/PasteTagsAction.java
===================================================================
--- org/openstreetmap/josm/actions/PasteTagsAction.java	(revision 6082)
+++ org/openstreetmap/josm/actions/PasteTagsAction.java	(working copy)
@@ -271,7 +271,7 @@
         String v;
         for (String key: tags.keySet()) {
             v = tags.get(key);
-            commands.add(new ChangePropertyCommand(selection, key, "".equals(v)?null:v));
+            commands.add(new ChangePropertyCommand(selection, key, v != null && v.isEmpty() ?null:v));
         }
         commitCommands(selection, commands);
         return !commands.isEmpty();
@@ -288,7 +288,7 @@
         PasteTagsAction.TagPaster tagPaster = new PasteTagsAction.TagPaster(directlyAdded, selection);
         List<Command> commands = new ArrayList<Command>();
         for (Tag tag : tagPaster.execute()) {
-            commands.add(new ChangePropertyCommand(selection, tag.getKey(), "".equals(tag.getValue()) ? null : tag.getValue()));
+            commands.add(new ChangePropertyCommand(selection, tag.getKey(), tag.getValue() != null && tag.getValue().isEmpty() ? null : tag.getValue()));
         }
         commitCommands(selection, commands);
         return true;
@@ -304,7 +304,7 @@
             String title2 = trn("to {0} object", "to {0} objects", selection.size(), selection.size());
             Main.main.undoRedo.add(
                     new SequenceCommand(
-                            title1 + " " + title2,
+                            title1 + ' ' + title2,
                             commands
                     ));
         }
Index: org/openstreetmap/josm/actions/PurgeAction.java
===================================================================
--- org/openstreetmap/josm/actions/PurgeAction.java	(revision 6082)
+++ org/openstreetmap/josm/actions/PurgeAction.java	(working copy)
@@ -243,7 +243,7 @@
                     return (Long.valueOf(o1.getUniqueId())).compareTo(o2.getUniqueId());
                 }
             });
-            JList list = new JList(toPurgeAdditionally.toArray(new OsmPrimitive[0]));
+            JList list = new JList(toPurgeAdditionally.toArray(new OsmPrimitive[toPurgeAdditionally.size()]));
             /* force selection to be active for all entries */
             list.setCellRenderer(new OsmPrimitivRenderer() {
                 @Override
Index: org/openstreetmap/josm/actions/RenameLayerAction.java
===================================================================
--- org/openstreetmap/josm/actions/RenameLayerAction.java	(revision 6082)
+++ org/openstreetmap/josm/actions/RenameLayerAction.java	(working copy)
@@ -77,7 +77,7 @@
             Main.pref.put("layer.rename-file", filerename.isSelected());
             if (filerename.isSelected()) {
                 String newname = nameText;
-                if (newname.indexOf("/") == -1 && newname.indexOf("\\") == -1) {
+                if (newname.indexOf('/') == -1 && newname.indexOf('\\') == -1) {
                     newname = file.getParent() + File.separator + newname;
                 }
                 String oldname = file.getName();
Index: org/openstreetmap/josm/actions/RestartAction.java
===================================================================
--- org/openstreetmap/josm/actions/RestartAction.java	(revision 6082)
+++ org/openstreetmap/josm/actions/RestartAction.java	(working copy)
@@ -89,7 +89,7 @@
             } else {
                 // else it's a .class, add the classpath and mainClass
                 cmd.add("-cp");
-                cmd.add("\"" + System.getProperty("java.class.path") + "\"");
+                cmd.add('"' + System.getProperty("java.class.path") + '"');
                 cmd.add(mainCommand[0]);
             }
             // finally add program arguments
@@ -101,7 +101,7 @@
                 @Override
                 public void run() {
                     try {
-                        Runtime.getRuntime().exec(cmd.toArray(new String[]{}));
+                        Runtime.getRuntime().exec(cmd.toArray(new String[cmd.size()]));
                     } catch (IOException e) {
                         e.printStackTrace();
                     }
Index: org/openstreetmap/josm/actions/SaveActionBase.java
===================================================================
--- org/openstreetmap/josm/actions/SaveActionBase.java	(revision 6082)
+++ org/openstreetmap/josm/actions/SaveActionBase.java	(working copy)
@@ -159,9 +159,9 @@
             // No filefilter accepts current filename, add default extension
             String fn = file.getPath();
             if (ff instanceof ExtensionFileFilter) {
-                fn += "." + ((ExtensionFileFilter)ff).getDefaultExtension();
+                fn += '.' + ((ExtensionFileFilter)ff).getDefaultExtension();
             } else if (extension != null) {
-                fn += "." + extension;
+                fn += '.' + extension;
             }
             file = new File(fn);
             if (!confirmOverwrite(file))
Index: org/openstreetmap/josm/actions/ShowStatusReportAction.java
===================================================================
--- org/openstreetmap/josm/actions/ShowStatusReportAction.java	(revision 6082)
+++ org/openstreetmap/josm/actions/ShowStatusReportAction.java	(working copy)
@@ -59,7 +59,7 @@
 
     private static void shortenParam(ListIterator<String> it, String[] param, String source, String target) {
         if (source != null && target.length() < source.length() && param[1].startsWith(source)) {
-            it.set(param[0] + "=" + param[1].replace(source, target));
+            it.set(param[0] + '=' + param[1].replace(source, target));
         }
     }
 
@@ -71,9 +71,9 @@
     {
         StringBuilder text = new StringBuilder();
         text.append(Version.getInstance().getReleaseAttributes());
-        text.append("\n");
-        text.append("Identification: " + Version.getInstance().getAgentString());
-        text.append("\n");
+        text.append('\n');
+        text.append("Identification: ").append(Version.getInstance().getAgentString());
+        text.append('\n');
         text.append("Memory Usage: ");
         text.append(Runtime.getRuntime().totalMemory()/1024/1024);
         text.append(" MB / ");
@@ -81,9 +81,9 @@
         text.append(" MB (");
         text.append(Runtime.getRuntime().freeMemory()/1024/1024);
         text.append(" MB allocated, but free)");
-        text.append("\n");
-        text.append("Java version: " + System.getProperty("java.version") + ", " + System.getProperty("java.vendor") + ", " + System.getProperty("java.vm.name"));
-        text.append("\n");
+        text.append('\n');
+        text.append("Java version: ").append(System.getProperty("java.version")).append(", ").append(System.getProperty("java.vendor")).append(", ").append(System.getProperty("java.vm.name"));
+        text.append('\n');
         try {
             final String env_java_home = System.getenv("JAVA_HOME");
             final String env_java_home_alt = Main.platform instanceof PlatformHookWindows ? "%JAVA_HOME%" : "${JAVA_HOME}";
@@ -106,15 +106,15 @@
                 }
             }
             if (!vmArguments.isEmpty()) {
-                text.append("VM arguments: "+ vmArguments.toString().replace("\\\\", "\\"));
-                text.append("\n");
+                text.append("VM arguments: ").append(vmArguments.toString().replace("\\\\", "\\"));
+                text.append('\n');
             }
         } catch (SecurityException e) {
             // Ignore exception
         }
         if (Main.commandLineArgs.length > 0) {
-            text.append("Program arguments: "+ Arrays.toString(Main.commandLineArgs));
-            text.append("\n");
+            text.append("Program arguments: ").append(Arrays.toString(Main.commandLineArgs));
+            text.append('\n');
         }
         if (Main.main != null) {
             DataSet dataset = Main.main.getCurrentDataSet();
@@ -123,13 +123,13 @@
                 if (result.length() == 0) {
                     text.append("Dataset consistency test: No problems found\n");
                 } else {
-                    text.append("\nDataset consistency test:\n"+result+"\n");
+                    text.append("\nDataset consistency test:\n").append(result).append('\n');
                 }
             }
         }
-        text.append("\n");
+        text.append('\n');
         text.append(PluginHandler.getBugReportText());
-        text.append("\n");
+        text.append('\n');
 
         return text.toString();
     }
@@ -151,7 +151,7 @@
                 }
             }
             for (Entry<String, Setting> entry : settings.entrySet()) {
-                text.append(entry.getKey()).append("=").append(entry.getValue().getValue().toString()).append("\n");
+                text.append(entry.getKey()).append('=').append(entry.getValue().getValue().toString()).append('\n');
             }
         } catch (Exception x) {
             x.printStackTrace();
Index: org/openstreetmap/josm/actions/UnGlueAction.java
===================================================================
--- org/openstreetmap/josm/actions/UnGlueAction.java	(revision 6082)
+++ org/openstreetmap/josm/actions/UnGlueAction.java	(working copy)
@@ -120,15 +120,15 @@
             }
         } else {
             errMsg =
-                tr("The current selection cannot be used for unglueing.")+"\n"+
-                "\n"+
-                tr("Select either:")+"\n"+
-                tr("* One tagged node, or")+"\n"+
-                tr("* One node that is used by more than one way, or")+"\n"+
-                tr("* One node that is used by more than one way and one of those ways, or")+"\n"+
-                tr("* One way that has one or more nodes that are used by more than one way, or")+"\n"+
-                tr("* One way and one or more of its nodes that are used by more than one way.")+"\n"+
-                "\n"+
+                tr("The current selection cannot be used for unglueing.")+ '\n' +
+                        '\n' +
+                tr("Select either:")+ '\n' +
+                tr("* One tagged node, or")+ '\n' +
+                tr("* One node that is used by more than one way, or")+ '\n' +
+                tr("* One node that is used by more than one way and one of those ways, or")+ '\n' +
+                tr("* One way that has one or more nodes that are used by more than one way, or")+ '\n' +
+                tr("* One way and one or more of its nodes that are used by more than one way.")+ '\n' +
+                        '\n' +
                 tr("Note: If a way is selected, this way will get fresh copies of the unglued\n"+
                         "nodes and the new nodes will be selected. Otherwise, all ways will get their\n"+
                 "own copy and all nodes will be selected.");
Index: org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java
===================================================================
--- org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java	(revision 6082)
+++ org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java	(working copy)
@@ -321,7 +321,7 @@
             String urlString = url.toExternalForm();
             if (urlString.matches(PATTERN_OSM_API_URL)) {
                 // TODO: proper i18n after stabilization
-                String message = "<ul><li>"+tr("OSM Server URL:") + " " + url.getHost() + "</li><li>" +
+                String message = "<ul><li>"+tr("OSM Server URL:") + ' ' + url.getHost() + "</li><li>" +
                         tr("Command")+": "+url.getPath()+"</li>";
                 if (url.getQuery() != null) {
                     message += "<li>" + tr("Request details: {0}", url.getQuery().replaceAll(",\\s*", ", ")) + "</li>";
Index: org/openstreetmap/josm/actions/mapmode/DrawAction.java
===================================================================
--- org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 6082)
+++ org/openstreetmap/josm/actions/mapmode/DrawAction.java	(working copy)
@@ -1209,12 +1209,12 @@
          */
         if (currentBaseNode != null && !wayIsFinished) {
             if (alt) {
-                rv += " " + tr("Start new way from last node.");
+                rv += ' ' + tr("Start new way from last node.");
             } else {
-                rv += " " + tr("Continue way from last node.");
+                rv += ' ' + tr("Continue way from last node.");
             }
             if (snapHelper.isSnapOn()) {
-                rv += " "+ tr("Angle snapping active.");
+                rv += ' ' + tr("Angle snapping active.");
             }
         }
 
@@ -1237,7 +1237,7 @@
             Way w = getCurrentDataSet().getSelectedWays().iterator().next();
             for (Node m : w.getNodes()) {
                 if (m.equals(mouseOnExistingNode) || mouseOnExistingWays.contains(w)) {
-                    rv += " " + tr("Finish drawing.");
+                    rv += ' ' + tr("Finish drawing.");
                     break;
                 }
             }
Index: org/openstreetmap/josm/actions/mapmode/SelectAction.java
===================================================================
--- org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 6082)
+++ org/openstreetmap/josm/actions/mapmode/SelectAction.java	(working copy)
@@ -884,7 +884,7 @@
                 return tr("Release the mouse button to select the objects in the rectangle.");
             else if (mode == Mode.move && (System.currentTimeMillis() - mouseDownTime >= initialMoveDelay)) {
                 final boolean canMerge = getCurrentDataSet()!=null && !getCurrentDataSet().getSelectedNodes().isEmpty();
-                final String mergeHelp = canMerge ? (" " + tr("Ctrl to merge with nearest node.")) : "";
+                final String mergeHelp = canMerge ? (' ' + tr("Ctrl to merge with nearest node.")) : "";
                 return tr("Release the mouse button to stop moving.") + mergeHelp;
             } else if (mode == Mode.rotate)
                 return tr("Release the mouse button to stop rotating.");
Index: org/openstreetmap/josm/actions/search/PushbackTokenizer.java
===================================================================
--- org/openstreetmap/josm/actions/search/PushbackTokenizer.java	(revision 6082)
+++ org/openstreetmap/josm/actions/search/PushbackTokenizer.java	(working copy)
@@ -36,7 +36,7 @@
          */
         @Override
         public String toString() {
-            return "Range [start=" + start + ", end=" + end + "]";
+            return "Range [start=" + start + ", end=" + end + ']';
         }
     }
 
Index: org/openstreetmap/josm/actions/search/SearchAction.java
===================================================================
--- org/openstreetmap/josm/actions/search/SearchAction.java	(revision 6082)
+++ org/openstreetmap/josm/actions/search/SearchAction.java	(working copy)
@@ -194,7 +194,7 @@
                     public void mouseClicked(MouseEvent e) {
                         try {
                             JTextComponent tf = (JTextComponent) hcb.getEditor().getEditorComponent();
-                            tf.getDocument().insertString(tf.getCaretPosition(), " " + insertText, null);
+                            tf.getDocument().insertString(tf.getCaretPosition(), ' ' + insertText, null);
                         } catch (BadLocationException ex) {
                             throw new RuntimeException(ex.getMessage(), ex);
                         }
@@ -636,7 +636,7 @@
                             /*regex search*/ trc("search", "RX")) : "";
                     String all = allElements ? (", " +
                             /*all elements*/ trc("search", "A")) : "";
-                    return "\"" + text + "\" (" + cs + rx + all + ", " + mode + ")";
+                    return '"' + text + "\" (" + cs + rx + all + ", " + mode + ')';
         }
 
         @Override
Index: org/openstreetmap/josm/actions/search/SearchCompiler.java
===================================================================
--- org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 6082)
+++ org/openstreetmap/josm/actions/search/SearchCompiler.java	(working copy)
@@ -142,7 +142,7 @@
                 else if ("nth%".equals(keyword))
                     return new Nth(tokenizer, true);
                 else if ("timestamp".equals(keyword)) {
-                    String rangeS = " " + tokenizer.readTextOrNumber() + " "; // add leading/trailing space in order to get expected split (e.g. "a--" => {"a", ""})
+                    String rangeS = ' ' + tokenizer.readTextOrNumber() + ' '; // add leading/trailing space in order to get expected split (e.g. "a--" => {"a", ""})
                     String[] rangeA = rangeS.split("/");
                     if (rangeA.length == 1)
                         return new KeyValue(keyword, rangeS.trim(), regexSearch, caseSensitive);
@@ -514,7 +514,7 @@
 
             return false;
         }
-        @Override public String toString() {return key+"="+value;}
+        @Override public String toString() {return key+ '=' +value;}
     }
 
     /**
@@ -534,13 +534,13 @@
         private final Mode mode;
 
         public ExactKeyValue(boolean regexp, String key, String value) throws ParseError {
-            if ("".equals(key))
+            if (key != null && key.isEmpty())
                 throw new ParseError(tr("Key cannot be empty when tag operator is used. Sample use: key=value"));
             this.key = key;
             this.value = value == null?"":value;
-            if ("".equals(this.value) && "*".equals(key)) {
+            if (this.value != null && this.value.isEmpty() && "*".equals(key)) {
                 mode = Mode.NONE;
-            } else if ("".equals(this.value)) {
+            } else if (this.value != null && this.value.isEmpty()) {
                 if (regexp) {
                     mode = Mode.MISSING_KEY_REGEXP;
                 } else {
@@ -679,7 +679,7 @@
 
         @Override public boolean match(OsmPrimitive osm) {
             if (!osm.hasKeys() && osm.getUser() == null)
-                return search.equals("");
+                return search.isEmpty();
 
             for (String key: osm.keySet()) {
                 String value = osm.get(key);
@@ -862,7 +862,7 @@
 
         @Override
         public String toString() {
-            return getString() + "=" + min + "-" + max;
+            return getString() + '=' + min + '-' + max;
         }
     }
 
@@ -1024,7 +1024,7 @@
             }
             return isParent;
         }
-        @Override public String toString() {return "parent(" + match + ")";}
+        @Override public String toString() {return "parent(" + match + ')';}
     }
 
     /**
@@ -1043,7 +1043,7 @@
             }
             return isChild;
         }
-        @Override public String toString() {return "child(" + match + ")";}
+        @Override public String toString() {return "child(" + match + ')';}
     }
 
     /**
Index: org/openstreetmap/josm/actions/upload/CyclicUploadDependencyException.java
===================================================================
--- org/openstreetmap/josm/actions/upload/CyclicUploadDependencyException.java	(revision 6082)
+++ org/openstreetmap/josm/actions/upload/CyclicUploadDependencyException.java	(working copy)
@@ -20,7 +20,7 @@
     protected String formatRelation(Relation r) {
         StringBuffer sb = new StringBuffer();
         if (r.getName() != null) {
-            sb.append("'").append(r.getName()).append("'");
+            sb.append('\'').append(r.getName()).append('\'');
         } else if (!r.isNew()) {
             sb.append(r.getId());
         } else {
@@ -33,14 +33,14 @@
     public String getMessage() {
         StringBuffer sb = new StringBuffer();
         sb.append(tr("Cyclic dependency between relations:"));
-        sb.append("[");
+        sb.append('[');
         for (int i=0; i< cycle.size(); i++) {
             if (i >0 ) {
-                sb.append(",");
+                sb.append(',');
             }
             sb.append(formatRelation(cycle.get(i)));
         }
-        sb.append("]");
+        sb.append(']');
         return sb.toString();
     }
 
Index: org/openstreetmap/josm/command/ChangePropertyKeyCommand.java
===================================================================
--- org/openstreetmap/josm/command/ChangePropertyKeyCommand.java	(revision 6082)
+++ org/openstreetmap/josm/command/ChangePropertyKeyCommand.java	(working copy)
@@ -72,9 +72,9 @@
         if (objects.size() == 1) {
             NameVisitor v = new NameVisitor();
             objects.iterator().next().accept(v);
-            text += " "+tr(v.className)+" "+v.name;
+            text += ' ' +tr(v.className)+ ' ' +v.name;
         } else {
-            text += " "+objects.size()+" "+trn("object","objects",objects.size());
+            text += " "+objects.size()+ ' ' +trn("object","objects",objects.size());
         }
         return text;
     }
Index: org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java
===================================================================
--- org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java	(revision 6082)
+++ org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java	(working copy)
@@ -67,7 +67,7 @@
         public StringSwitcher(String a, String b) {
             this.a = a;
             this.b = b;
-            this.pattern = getPatternFor(a + "|" + b);
+            this.pattern = getPatternFor(a + '|' + b);
         }
 
         public String apply(String text) {
Index: org/openstreetmap/josm/corrector/TagCorrector.java
===================================================================
--- org/openstreetmap/josm/corrector/TagCorrector.java	(revision 6082)
+++ org/openstreetmap/josm/corrector/TagCorrector.java	(working copy)
@@ -86,7 +86,7 @@
                 p.add(propertiesLabel, GBC.std());
 
                 final JLabel primitiveLabel = new JLabel(
-                        primitive.getDisplayName(DefaultNameFormatter.getInstance()) + ":",
+                        primitive.getDisplayName(DefaultNameFormatter.getInstance()) + ':',
                         ImageProvider.get(primitive.getDisplayType()),
                         JLabel.LEFT
                 );
Index: org/openstreetmap/josm/data/Bounds.java
===================================================================
--- org/openstreetmap/josm/data/Bounds.java	(revision 6082)
+++ org/openstreetmap/josm/data/Bounds.java	(working copy)
@@ -186,14 +186,14 @@
     }
 
     @Override public String toString() {
-        return "Bounds["+minLat+","+minLon+","+maxLat+","+maxLon+"]";
+        return "Bounds["+minLat+ ',' +minLon+ ',' +maxLat+ ',' +maxLon+ ']';
     }
 
     public String toShortString(DecimalFormat format) {
         return
-        format.format(minLat) + " "
+        format.format(minLat) + ' '
         + format.format(minLon) + " / "
-        + format.format(maxLat) + " "
+        + format.format(maxLat) + ' '
         + format.format(maxLon);
     }
 
Index: org/openstreetmap/josm/data/CustomConfigurator.java
===================================================================
--- org/openstreetmap/josm/data/CustomConfigurator.java	(revision 6082)
+++ org/openstreetmap/josm/data/CustomConfigurator.java	(working copy)
@@ -64,7 +64,7 @@
 
     public static void log(String s) {
         summary.append(s);
-        summary.append("\n");
+        summary.append('\n');
     }
 
     public static String getLog() {
@@ -453,7 +453,7 @@
                 engine.eval("API={}; API.pref={}; API.fragments={};");
 
                 engine.eval("homeDir='"+normalizeDirName(Main.pref.getPreferencesDir()) +"';");
-                engine.eval("josmVersion="+Version.getInstance().getVersion()+";");
+                engine.eval("josmVersion="+Version.getInstance().getVersion()+ ';');
                 String className =  CustomConfigurator.class.getName();
                 engine.eval("API.messageBox="+className+".messageBox");
                 engine.eval("API.askText=function(text) { return String("+className+".askForText(text));}");
@@ -1106,7 +1106,7 @@
             "    jsList.push(String(list.get(i)));"+
             "  }"+
             "return jsList;"+
-            "}"+
+                    '}' +
             "function getJSMap( javaMap ) {"+
             " var jsMap; var it; var e; "+
             " if (javaMap == null) return null;"+
@@ -1116,7 +1116,7 @@
             "    jsMap[ String(e.getKey()) ] = String(e.getValue()); "+
             "  }"+
             "  return jsMap;"+
-            "}"+
+                    '}' +
             "for (it = stringMap.entrySet().iterator(); it.hasNext();) {"+
             "  e = it.next();"+
             whereToPutInJS+"[String(e.getKey())] = String(e.getValue());"+
Index: org/openstreetmap/josm/data/Preferences.java
===================================================================
--- org/openstreetmap/josm/data/Preferences.java	(revision 6082)
+++ org/openstreetmap/josm/data/Preferences.java	(working copy)
@@ -437,7 +437,7 @@
     synchronized public String get(final String key, final String def) {
         putDefault(key, def);
         final String prop = properties.get(key);
-        if (prop == null || prop.equals(""))
+        if (prop == null || prop.isEmpty())
             return def;
         return prop;
     }
@@ -511,7 +511,7 @@
 
     synchronized public boolean getBoolean(final String key, final String specName, final boolean def) {
         putDefault(key, Boolean.toString(def));
-        String skey = key+"."+specName;
+        String skey = key+ '.' +specName;
         if(properties.containsKey(skey))
             return Boolean.parseBoolean(properties.get(skey));
         return properties.containsKey(key) ? Boolean.parseBoolean(properties.get(key)) : def;
@@ -770,15 +770,15 @@
         }
         putDefault("color."+colKey, ColorHelper.color2html(def));
         String colStr = specName != null ? get("color."+specName) : "";
-        if(colStr.equals("")) {
+        if(colStr.isEmpty()) {
             colStr = get("color."+colKey);
         }
-        return colStr.equals("") ? def : ColorHelper.html2color(colStr);
+        return colStr.isEmpty() ? def : ColorHelper.html2color(colStr);
     }
 
     synchronized public Color getDefaultColor(String colKey) {
         String colStr = defaults.get("color."+colKey);
-        return colStr == null || "".equals(colStr) ? null : ColorHelper.html2color(colStr);
+        return colStr == null || colStr != null && colStr.isEmpty() ? null : ColorHelper.html2color(colStr);
     }
 
     synchronized public boolean putColor(String colKey, Color val) {
@@ -801,7 +801,7 @@
 
     synchronized public int getInteger(String key, String specName, int def) {
         putDefault(key, Integer.toString(def));
-        String v = get(key+"."+specName);
+        String v = get(key+ '.' +specName);
         if(v.isEmpty())
             v = get(key);
         if(v.isEmpty())
Index: org/openstreetmap/josm/data/ProjectionBounds.java
===================================================================
--- org/openstreetmap/josm/data/ProjectionBounds.java	(revision 6082)
+++ org/openstreetmap/josm/data/ProjectionBounds.java	(working copy)
@@ -61,7 +61,7 @@
     }
 
     @Override public String toString() {
-        return "ProjectionBounds["+minEast+","+minNorth+","+maxEast+","+maxNorth+"]";
+        return "ProjectionBounds["+minEast+ ',' +minNorth+ ',' +maxEast+ ',' +maxNorth+ ']';
     }
 
     /**
Index: org/openstreetmap/josm/data/ServerSidePreferences.java
===================================================================
--- org/openstreetmap/josm/data/ServerSidePreferences.java	(revision 6082)
+++ org/openstreetmap/josm/data/ServerSidePreferences.java	(working copy)
@@ -51,7 +51,7 @@
                 String username = get("applet.username");
                 String password = get("applet.password");
                 if(password.isEmpty() && username.isEmpty()) {
-                    con.addRequestProperty("Authorization", "Basic "+Base64.encode(username+":"+password));
+                    con.addRequestProperty("Authorization", "Basic "+Base64.encode(username+ ':' +password));
                 }
                 con.connect();
                 if(username.isEmpty() && con instanceof HttpURLConnection
@@ -65,7 +65,7 @@
                 StringBuilder b = new StringBuilder();
                 for (String line = reader.readLine(); line != null; line = reader.readLine()) {
                     b.append(line);
-                    b.append("\n");
+                    b.append('\n');
                 }
                 if (con instanceof HttpURLConnection) {
                     ((HttpURLConnection) con).disconnect();
@@ -84,7 +84,7 @@
                 String username = get("applet.username");
                 String password = get("applet.password");
                 if(password.isEmpty() && username.isEmpty()) {
-                    con.addRequestProperty("Authorization", "Basic "+Base64.encode(username+":"+password));
+                    con.addRequestProperty("Authorization", "Basic "+Base64.encode(username+ ':' +password));
                 }
                 con.setRequestMethod("POST");
                 con.setDoOutput(true);
Index: org/openstreetmap/josm/data/Version.java
===================================================================
--- org/openstreetmap/josm/data/Version.java	(revision 6082)
+++ org/openstreetmap/josm/data/Version.java	(working copy)
@@ -40,7 +40,7 @@
             StringBuffer sb = new StringBuffer();
             try {
                 for (String line = in.readLine(); line != null; line = in.readLine()) {
-                    sb.append(line).append("\n");
+                    sb.append(line).append('\n');
                 }
             } finally {
                 Utils.close(in);
@@ -78,7 +78,7 @@
         if (content == null) return properties;
         Pattern p = Pattern.compile("^([^:]+):(.*)$");
         for (String line: content.split("\n")) {
-            if (line == null || line.trim().equals("")) {
+            if (line == null || line.trim().isEmpty()) {
                 continue;
             }
             if (line.matches("^\\s*#.*$")) {
@@ -146,7 +146,7 @@
         //
         StringBuffer sb = new StringBuffer();
         for(Entry<String,String> property: properties.entrySet()) {
-            sb.append(property.getKey()).append(":").append(property.getValue()).append("\n");
+            sb.append(property.getKey()).append(':').append(property.getValue()).append('\n');
         }
         releaseDescription = sb.toString();
     }
@@ -228,14 +228,14 @@
         int v = getVersion();
         String s = (v == JOSM_UNKNOWN_VERSION) ? "UNKNOWN" : Integer.toString(v);
         if (buildName != null) {
-            s += " " + buildName;
+            s += ' ' + buildName;
         }
         if (isLocalBuild() && v != JOSM_UNKNOWN_VERSION) {
             s += " SVN";
         }
-        String result = "JOSM/1.5 ("+ s+" "+LanguageInfo.getJOSMLocaleCode()+")";
+        String result = "JOSM/1.5 ("+ s+ ' ' +LanguageInfo.getJOSMLocaleCode()+ ')';
         if (includeOsDetails) {
-            result += " " + Main.platform.getOSDescription();
+            result += ' ' + Main.platform.getOSDescription();
         }
         return result;
     }
Index: org/openstreetmap/josm/data/coor/CachedLatLon.java
===================================================================
--- org/openstreetmap/josm/data/coor/CachedLatLon.java	(revision 6082)
+++ org/openstreetmap/josm/data/coor/CachedLatLon.java	(working copy)
@@ -58,7 +58,7 @@
         return eastNorth;
     }
     @Override public String toString() {
-        return "CachedLatLon[lat="+lat()+",lon="+lon()+"]";
+        return "CachedLatLon[lat="+lat()+",lon="+lon()+ ']';
     }
 
     // Only for Node.get3892DebugInfo()
Index: org/openstreetmap/josm/data/coor/EastNorth.java
===================================================================
--- org/openstreetmap/josm/data/coor/EastNorth.java	(revision 6082)
+++ org/openstreetmap/josm/data/coor/EastNorth.java	(working copy)
@@ -91,7 +91,7 @@
     }
 
     @Override public String toString() {
-        return "EastNorth[e="+x+", n="+y+"]";
+        return "EastNorth[e="+x+", n="+y+ ']';
     }
 
     /**
Index: org/openstreetmap/josm/data/coor/LatLon.java
===================================================================
--- org/openstreetmap/josm/data/coor/LatLon.java	(revision 6082)
+++ org/openstreetmap/josm/data/coor/LatLon.java	(working copy)
@@ -128,7 +128,7 @@
             sDegrees = Integer.toString(tDegree+1);
         }
 
-        return sDegrees + "\u00B0" + sMinutes + "\'" + sSeconds + "\"";
+        return sDegrees + '\u00B0' + sMinutes + '\'' + sSeconds + '"';
     }
 
     /**
@@ -150,7 +150,7 @@
             sDegrees = Integer.toString(tDegree+1);
         }
 
-        return sDegrees + "\u00B0" + sMinutes + "\'";
+        return sDegrees + '\u00B0' + sMinutes + '\'';
     }
 
     public LatLon(double lat, double lon) {
@@ -273,7 +273,7 @@
     public String toDisplayString() {
         NumberFormat nf = NumberFormat.getInstance();
         nf.setMaximumFractionDigits(5);
-        return "lat=" + nf.format(lat()) + "\u00B0, lon=" + nf.format(lon()) + "\u00B0";
+        return "lat=" + nf.format(lat()) + "\u00B0, lon=" + nf.format(lon()) + '\u00B0';
     }
 
     public LatLon interpolate(LatLon ll2, double proportion) {
@@ -286,7 +286,7 @@
     }
 
     @Override public String toString() {
-        return "LatLon[lat="+lat()+",lon="+lon()+"]";
+        return "LatLon[lat="+lat()+",lon="+lon()+ ']';
     }
 
     /**
Index: org/openstreetmap/josm/data/gpx/WayPoint.java
===================================================================
--- org/openstreetmap/josm/data/gpx/WayPoint.java	(revision 6082)
+++ org/openstreetmap/josm/data/gpx/WayPoint.java	(working copy)
@@ -96,7 +96,7 @@
 
     @Override
     public String toString() {
-        return "WayPoint (" + (attr.containsKey("name") ? attr.get("name") + ", " :"") + getCoor().toString() + ", " + attr + ")";
+        return "WayPoint (" + (attr.containsKey("name") ? attr.get("name") + ", " :"") + getCoor().toString() + ", " + attr + ')';
     }
 
     /**
Index: org/openstreetmap/josm/data/imagery/ImageryInfo.java
===================================================================
--- org/openstreetmap/josm/data/imagery/ImageryInfo.java	(revision 6082)
+++ org/openstreetmap/josm/data/imagery/ImageryInfo.java	(working copy)
@@ -521,7 +521,7 @@
 
     public String getExtendedUrl() {
         return imageryType.getUrlString() + (defaultMaxZoom != 0
-            ? "["+(defaultMinZoom != 0 ? defaultMinZoom+",":"")+defaultMaxZoom+"]" : "") + ":" + url;
+            ? '[' +(defaultMinZoom != 0 ? defaultMinZoom+",":"")+defaultMaxZoom+ ']' : "") + ':' + url;
     }
 
     public String getToolbarName()
@@ -537,7 +537,7 @@
     {
         String res = name;
         if(pixelPerDegree != 0.0) {
-            res += " ("+pixelPerDegree+")";
+            res += " ("+pixelPerDegree+ ')';
         }
         return res;
     }
Index: org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java
===================================================================
--- org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java	(revision 6082)
+++ org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java	(working copy)
@@ -126,7 +126,7 @@
 
     // some additional checks to respect extended URLs in preferences (legacy workaround)
     private boolean isSimilar(String a, String b) {
-        return Utils.equal(a, b) || (a != null && b != null && !"".equals(a) && !"".equals(b) && (a.contains(b) || b.contains(a)));
+        return Utils.equal(a, b) || (a != null && b != null && a != null && !a.isEmpty() && b != null && !b.isEmpty() && (a.contains(b) || b.contains(a)));
     }
 
     public void add(ImageryInfo info) {
Index: org/openstreetmap/josm/data/imagery/WmsCache.java
===================================================================
--- org/openstreetmap/josm/data/imagery/WmsCache.java	(revision 6082)
+++ org/openstreetmap/josm/data/imagery/WmsCache.java	(working copy)
@@ -302,7 +302,7 @@
     }
 
     private File getImageFile(ProjectionEntries projection, CacheEntry entry) {
-        return new File(cacheDir, projection.cacheDirectory + "/" + entry.filename);
+        return new File(cacheDir, projection.cacheDirectory + '/' + entry.filename);
     }
 
 
Index: org/openstreetmap/josm/data/osm/AbstractPrimitive.java
===================================================================
--- org/openstreetmap/josm/data/osm/AbstractPrimitive.java	(revision 6082)
+++ org/openstreetmap/josm/data/osm/AbstractPrimitive.java	(working copy)
@@ -428,16 +428,16 @@
         StringBuilder builder = new StringBuilder();
 
         if (isIncomplete()) {
-            builder.append("I");
+            builder.append('I');
         }
         if (isModified()) {
-            builder.append("M");
+            builder.append('M');
         }
         if (isVisible()) {
-            builder.append("V");
+            builder.append('V');
         }
         if (isDeleted()) {
-            builder.append("D");
+            builder.append('D');
         }
         return builder.toString();
     }
@@ -697,7 +697,7 @@
         String key = "name:" + Locale.getDefault().toString();
         if (get(key) != null)
             return get(key);
-        key = "name:" + Locale.getDefault().getLanguage() + "_" + Locale.getDefault().getCountry();
+        key = "name:" + Locale.getDefault().getLanguage() + '_' + Locale.getDefault().getCountry();
         if (get(key) != null)
             return get(key);
         key = "name:" + Locale.getDefault().getLanguage();
Index: org/openstreetmap/josm/data/osm/DatasetConsistencyTest.java
===================================================================
--- org/openstreetmap/josm/data/osm/DatasetConsistencyTest.java	(revision 6082)
+++ org/openstreetmap/josm/data/osm/DatasetConsistencyTest.java	(working copy)
@@ -28,7 +28,7 @@
     private void printError(String type, String message, Object... args) {
         errorCount++;
         if (errorCount <= MAX_ERRORS) {
-            writer.println("[" + type + "] " + String.format(message, args));
+            writer.println('[' + type + "] " + String.format(message, args));
         }
     }
 
Index: org/openstreetmap/josm/data/osm/Node.java
===================================================================
--- org/openstreetmap/josm/data/osm/Node.java	(revision 6082)
+++ org/openstreetmap/josm/data/osm/Node.java	(working copy)
@@ -261,7 +261,7 @@
     @Override
     public String toString() {
         String coorDesc = isLatLonKnown() ? "lat="+lat+",lon="+lon : "";
-        return "{Node id=" + getUniqueId() + " version=" + getVersion() + " " + getFlagsAsString() + " "  + coorDesc+"}";
+        return "{Node id=" + getUniqueId() + " version=" + getVersion() + ' ' + getFlagsAsString() + ' ' + coorDesc+ '}';
     }
 
     @Override
Index: org/openstreetmap/josm/data/osm/OsmPrimitive.java
===================================================================
--- org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 6082)
+++ org/openstreetmap/josm/data/osm/OsmPrimitive.java	(working copy)
@@ -1185,19 +1185,19 @@
 
         if (isDisabled()) {
             if (isDisabledAndHidden()) {
-                builder.append("h");
+                builder.append('h');
             } else {
-                builder.append("d");
+                builder.append('d');
             }
         }
         if (isTagged()) {
-            builder.append("T");
+            builder.append('T');
         }
         if (hasDirectionKeys()) {
             if (reversedDirection()) {
-                builder.append("<");
+                builder.append('<');
             } else {
-                builder.append(">");
+                builder.append('>');
             }
         }
         return builder.toString();
Index: org/openstreetmap/josm/data/osm/QuadBuckets.java
===================================================================
--- org/openstreetmap/josm/data/osm/QuadBuckets.java	(revision 6082)
+++ org/openstreetmap/josm/data/osm/QuadBuckets.java	(working copy)
@@ -43,7 +43,7 @@
         if (now - last_out < 300)
             return;
         last_out = now;
-        System.out.print(s + "\r");
+        System.out.print(s + '\r');
     }
     void pout(String s, int i, int total)
     {
@@ -53,7 +53,7 @@
             return;
         last_out = now;
         // cast to float to keep the output size down
-        System.out.print(s + " " + (float)((i+1)*100.0/total) + "% done    \r");
+        System.out.print(s + ' ' + (float)((i+1)*100.0/total) + "% done    \r");
     }
 
     public static final int MAX_OBJECTS_PER_LEVEL = 16;
@@ -111,7 +111,7 @@
 
         @Override
         public String toString()  {
-            return super.toString()+ "["+level+"]: " + bbox();
+            return super.toString()+ '[' +level+"]: " + bbox();
         }
         /**
          * Constructor for root node
@@ -472,7 +472,7 @@
                 return;
 
             if (!canRemove()) {
-                abort("attempt to remove non-empty child: " + this.content + " " + Arrays.toString(this.getChildren()));
+                abort("attempt to remove non-empty child: " + this.content + ' ' + Arrays.toString(this.getChildren()));
             }
 
             if (parent.nw == this) {
Index: org/openstreetmap/josm/data/osm/Relation.java
===================================================================
--- org/openstreetmap/josm/data/osm/Relation.java	(revision 6082)
+++ org/openstreetmap/josm/data/osm/Relation.java	(working copy)
@@ -263,18 +263,18 @@
         result.append(getUniqueId());
         result.append(" version=");
         result.append(getVersion());
-        result.append(" ");
+        result.append(' ');
         result.append(getFlagsAsString());
         result.append(" [");
         for (RelationMember rm:getMembers()) {
             result.append(OsmPrimitiveType.from(rm.getMember()));
-            result.append(" ");
+            result.append(' ');
             result.append(rm.getMember().getUniqueId());
             result.append(", ");
         }
         result.delete(result.length()-2, result.length());
-        result.append("]");
-        result.append("}");
+        result.append(']');
+        result.append('}');
         return result.toString();
     }
 
Index: org/openstreetmap/josm/data/osm/RelationMember.java
===================================================================
--- org/openstreetmap/josm/data/osm/RelationMember.java	(revision 6082)
+++ org/openstreetmap/josm/data/osm/RelationMember.java	(working copy)
@@ -34,7 +34,7 @@
      * @since 1930
      */
     public boolean hasRole() {
-        return !"".equals(role);
+        return role != null && !role.isEmpty();
     }
 
     /**
Index: org/openstreetmap/josm/data/osm/RelationMemberData.java
===================================================================
--- org/openstreetmap/josm/data/osm/RelationMemberData.java	(revision 6082)
+++ org/openstreetmap/josm/data/osm/RelationMemberData.java	(working copy)
@@ -30,12 +30,12 @@
     }
 
     public boolean hasRole() {
-        return !"".equals(role);
+        return role != null && !role.isEmpty();
     }
 
     @Override
     public String toString() {
-        return (memberType != null ? memberType.getAPIName() : "undefined") + " " + memberId;
+        return (memberType != null ? memberType.getAPIName() : "undefined") + ' ' + memberId;
     }
 
     /**
Index: org/openstreetmap/josm/data/osm/Tag.java
===================================================================
--- org/openstreetmap/josm/data/osm/Tag.java	(revision 6082)
+++ org/openstreetmap/josm/data/osm/Tag.java	(working copy)
@@ -98,6 +98,6 @@
 
     @Override
     public String toString() {
-        return key + "=" + value;
+        return key + '=' + value;
     }
 }
Index: org/openstreetmap/josm/data/osm/TagCollection.java
===================================================================
--- org/openstreetmap/josm/data/osm/TagCollection.java	(revision 6082)
+++ org/openstreetmap/josm/data/osm/TagCollection.java	(working copy)
@@ -600,7 +600,7 @@
         if (! isApplicableToPrimitive())
             throw new IllegalStateException(tr("Tag collection cannot be applied to a primitive because there are keys with multiple values."));
         for (Tag tag: tags) {
-            if (tag.getValue() == null || tag.getValue().equals("")) {
+            if (tag.getValue() == null || tag.getValue().isEmpty()) {
                 primitive.remove(tag.getKey());
             } else {
                 primitive.put(tag.getKey(), tag.getValue());
Index: org/openstreetmap/josm/data/osm/User.java
===================================================================
--- org/openstreetmap/josm/data/osm/User.java	(revision 6082)
+++ org/openstreetmap/josm/data/osm/User.java	(working copy)
@@ -204,9 +204,9 @@
     @Override
     public String toString() {
         StringBuffer s = new StringBuffer();
-        s.append("id:"+uid);
+        s.append("id:").append(uid);
         if (names.size() == 1) {
-            s.append(" name:"+getName());
+            s.append(" name:").append(getName());
         }
         else if (names.size() > 1) {
             s.append(String.format(" %d names:%s", names.size(), getName()));
Index: org/openstreetmap/josm/data/osm/Way.java
===================================================================
--- org/openstreetmap/josm/data/osm/Way.java	(revision 6082)
+++ org/openstreetmap/josm/data/osm/Way.java	(working copy)
@@ -321,7 +321,7 @@
     @Override
     public String toString() {
         String nodesDesc = isIncomplete()?"(incomplete)":"nodes=" + Arrays.toString(nodes);
-        return "{Way id=" + getUniqueId() + " version=" + getVersion()+ " " + getFlagsAsString()  + " " + nodesDesc + "}";
+        return "{Way id=" + getUniqueId() + " version=" + getVersion()+ ' ' + getFlagsAsString()  + ' ' + nodesDesc + '}';
     }
 
     @Override
Index: org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java
===================================================================
--- org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java	(revision 6082)
+++ org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java	(working copy)
@@ -221,7 +221,7 @@
         String key = "name:" + Locale.getDefault().toString();
         if (get(key) != null)
             return get(key);
-        key = "name:" + Locale.getDefault().getLanguage() + "_" + Locale.getDefault().getCountry();
+        key = "name:" + Locale.getDefault().getLanguage() + '_' + Locale.getDefault().getCountry();
         if (get(key) != null)
             return get(key);
         key = "name:" + Locale.getDefault().getLanguage();
@@ -264,6 +264,6 @@
                 + (timestamp != null ? "timestamp=" + timestamp : "") + ", "
                 + (user != null ? "user=" + user + ", " : "") + "changesetId="
                 + changesetId
-                + "]";
+                + ']';
     }
 }
Index: org/openstreetmap/josm/data/osm/visitor/BoundingXYVisitor.java
===================================================================
--- org/openstreetmap/josm/data/osm/visitor/BoundingXYVisitor.java	(revision 6082)
+++ org/openstreetmap/josm/data/osm/visitor/BoundingXYVisitor.java	(working copy)
@@ -120,7 +120,7 @@
     }
 
     @Override public String toString() {
-        return "BoundingXYVisitor["+bounds+"]";
+        return "BoundingXYVisitor["+bounds+ ']';
     }
 
     public void computeBoundingBox(Collection<? extends OsmPrimitive> primitives) {
Index: org/openstreetmap/josm/data/projection/CustomProjection.java
===================================================================
--- org/openstreetmap/josm/data/projection/CustomProjection.java	(revision 6082)
+++ org/openstreetmap/josm/data/projection/CustomProjection.java	(working copy)
@@ -396,21 +396,21 @@
         boolean dms = false;
         double deg = 0.0, min = 0.0, sec = 0.0;
         // degrees
-        m = Pattern.compile("^"+FLOAT+"d").matcher(s);
+        m = Pattern.compile('^' +FLOAT+ 'd').matcher(s);
         if (m.find()) {
             s = s.substring(m.end());
             deg = Double.parseDouble(m.group(1));
             dms = true;
         }
         // minutes
-        m = Pattern.compile("^"+FLOAT+"'").matcher(s);
+        m = Pattern.compile('^' +FLOAT+ '\'').matcher(s);
         if (m.find()) {
             s = s.substring(m.end());
             min = Double.parseDouble(m.group(1));
             dms = true;
         }
         // seconds
-        m = Pattern.compile("^"+FLOAT+"\"").matcher(s);
+        m = Pattern.compile('^' +FLOAT+ '"').matcher(s);
         if (m.find()) {
             s = s.substring(m.end());
             sec = Double.parseDouble(m.group(1));
@@ -420,7 +420,7 @@
         if (dms) {
             value = deg + (min/60.0) + (sec/3600.0);
         } else {
-            m = Pattern.compile("^"+FLOAT).matcher(s);
+            m = Pattern.compile('^' +FLOAT).matcher(s);
             if (m.find()) {
                 s = s.substring(m.end());
                 value += Double.parseDouble(m.group(1));
Index: org/openstreetmap/josm/data/projection/Ellipsoid.java
===================================================================
--- org/openstreetmap/josm/data/projection/Ellipsoid.java	(revision 6082)
+++ org/openstreetmap/josm/data/projection/Ellipsoid.java	(working copy)
@@ -128,7 +128,7 @@
 
     @Override
     public String toString() {
-        return "Ellipsoid{a="+a+", b="+b+"}";
+        return "Ellipsoid{a="+a+", b="+b+ '}';
     }
 
     /**
Index: org/openstreetmap/josm/data/projection/datum/CentricDatum.java
===================================================================
--- org/openstreetmap/josm/data/projection/datum/CentricDatum.java	(revision 6082)
+++ org/openstreetmap/josm/data/projection/datum/CentricDatum.java	(working copy)
@@ -26,6 +26,6 @@
 
     @Override
     public String toString() {
-        return "CentricDatum{ellipsoid="+ellps+"}";
+        return "CentricDatum{ellipsoid="+ellps+ '}';
     }
 }
Index: org/openstreetmap/josm/data/validation/TestError.java
===================================================================
--- org/openstreetmap/josm/data/validation/TestError.java	(revision 6082)
+++ org/openstreetmap/josm/data/validation/TestError.java	(working copy)
@@ -182,10 +182,10 @@
             } else if (o instanceof Node) {
                 type = "n";
             }
-            strings.add(type + "_" + o.getId());
+            strings.add(type + '_' + o.getId());
         }
         for (String o : strings) {
-            ignorestring += ":" + o;
+            ignorestring += ':' + o;
         }
         return ignorestring;
     }
@@ -193,7 +193,7 @@
     public String getIgnoreSubGroup() {
         String ignorestring = getIgnoreGroup();
         if (description_en != null) {
-            ignorestring += "_" + description_en;
+            ignorestring += '_' + description_en;
         }
         return ignorestring;
     }
@@ -321,6 +321,6 @@
 
     @Override
     public String toString() {
-        return "TestError [tester=" + tester + ", code=" + code + "]";
+        return "TestError [tester=" + tester + ", code=" + code + ']';
     }
 }
Index: org/openstreetmap/josm/data/validation/tests/RelationChecker.java
===================================================================
--- org/openstreetmap/josm/data/validation/tests/RelationChecker.java	(revision 6082)
+++ org/openstreetmap/josm/data/validation/tests/RelationChecker.java	(working copy)
@@ -146,7 +146,7 @@
                 for (Role r : allroles) {
                     done.add(r.key);
                     String keyname = r.key;
-                    if ("".equals(keyname)) {
+                    if (keyname != null && keyname.isEmpty()) {
                         keyname = tr("<empty>");
                     }
                     RoleInfo ri = map.get(r.key);
Index: org/openstreetmap/josm/data/validation/tests/TagChecker.java
===================================================================
--- org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 6082)
+++ org/openstreetmap/josm/data/validation/tests/TagChecker.java	(working copy)
@@ -86,7 +86,7 @@
     protected static final List<IgnoreKeyPair> ignoreDataKeyPair = new ArrayList<IgnoreKeyPair>();
 
     /** The preferences prefix */
-    protected static final String PREFIX = ValidatorPreference.PREFIX + "." + TagChecker.class.getSimpleName();
+    protected static final String PREFIX = ValidatorPreference.PREFIX + '.' + TagChecker.class.getSimpleName();
 
     public static final String PREF_CHECK_VALUES = PREFIX + ".checkValues";
     public static final String PREF_CHECK_KEYS = PREFIX + ".checkKeys";
@@ -182,21 +182,21 @@
             if (sources == null || sources.length() == 0) {
                 sources = DATA_FILE;
             } else {
-                sources = DATA_FILE + ";" + sources;
+                sources = DATA_FILE + ';' + sources;
             }
         }
         if (Main.pref.getBoolean(PREF_USE_IGNORE_FILE, true)) {
             if (sources == null || sources.length() == 0) {
                 sources = IGNORE_FILE;
             } else {
-                sources = IGNORE_FILE + ";" + sources;
+                sources = IGNORE_FILE + ';' + sources;
             }
         }
         if (Main.pref.getBoolean(PREF_USE_SPELL_FILE, true)) {
             if( sources == null || sources.length() == 0) {
                 sources = SPELL_FILE;
             } else {
-                sources = SPELL_FILE + ";" + sources;
+                sources = SPELL_FILE + ';' + sources;
             }
         }
 
@@ -244,7 +244,7 @@
                             ignoreDataEndsWith.add(line);
                         } else if (key.equals("K:")) {
                             IgnoreKeyPair tmp = new IgnoreKeyPair();
-                            int mid = line.indexOf("=");
+                            int mid = line.indexOf('=');
                             tmp.key = line.substring(0, mid);
                             tmp.value = line.substring(mid+1);
                             ignoreDataKeyPair.add(tmp);
@@ -270,7 +270,7 @@
                     }
                 }
             } catch (IOException e) {
-                errorSources += source + "\n";
+                errorSources += source + '\n';
             }
         }
 
@@ -401,7 +401,7 @@
                         tr(s, key), MessageFormat.format(s, key), INVALID_KEY, p) );
                 withErrors.put(p, "IPK");
             }
-            if (checkKeys && key.indexOf(" ") >= 0 && !withErrors.contains(p, "IPK")) {
+            if (checkKeys && key.indexOf(' ') >= 0 && !withErrors.contains(p, "IPK")) {
                 errors.add( new TestError(this, Severity.WARNING, tr("Invalid white space in property key"),
                         tr(s, key), MessageFormat.format(s, key), INVALID_KEY_SPACE, p) );
                 withErrors.put(p, "IPK");
Index: org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java
===================================================================
--- org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java	(revision 6082)
+++ org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java	(working copy)
@@ -39,7 +39,7 @@
 public class UnconnectedWays extends Test {
 
     protected static final int UNCONNECTED_WAYS = 1301;
-    protected static final String PREFIX = ValidatorPreference.PREFIX + "." + UnconnectedWays.class.getSimpleName();
+    protected static final String PREFIX = ValidatorPreference.PREFIX + '.' + UnconnectedWays.class.getSimpleName();
 
     Set<MyWaySegment> ways;
     QuadBuckets<Node> endnodes; // nodes at end of way
Index: org/openstreetmap/josm/gui/BookmarkList.java
===================================================================
--- org/openstreetmap/josm/gui/BookmarkList.java	(revision 6082)
+++ org/openstreetmap/josm/gui/BookmarkList.java	(working copy)
@@ -215,10 +215,10 @@
             Bounds area = b.getArea();
             StringBuffer sb = new StringBuffer();
             sb.append("<html>min[latitude,longitude]=<strong>[")
-            .append(area.getMin().lat()).append(",").append(area.getMin().lon()).append("]</strong>")
+            .append(area.getMin().lat()).append(',').append(area.getMin().lon()).append("]</strong>")
             .append("<br>")
             .append("max[latitude,longitude]=<strong>[")
-            .append(area.getMax().lat()).append(",").append(area.getMax().lon()).append("]</strong>")
+            .append(area.getMax().lat()).append(',').append(area.getMax().lon()).append("]</strong>")
             .append("</html>");
             return sb.toString();
 
Index: org/openstreetmap/josm/gui/DefaultNameFormatter.java
===================================================================
--- org/openstreetmap/josm/gui/DefaultNameFormatter.java	(revision 6082)
+++ org/openstreetmap/josm/gui/DefaultNameFormatter.java	(working copy)
@@ -172,14 +172,14 @@
                 }
 
                 if (n == null) {
-                    n = node.isNew() ? tr("node") : ""+ node.getId();
+                    n = node.isNew() ? tr("node") : Long.toString(node.getId());
                 }
                 name.append(n);
             } else {
                 preset.nameTemplate.appendText(name, node);
             }
             if (node.getCoor() != null) {
-                name.append(" \u200E(").append(node.getCoor().latToString(CoordinateFormat.getDefaultFormat())).append(", ").append(node.getCoor().lonToString(CoordinateFormat.getDefaultFormat())).append(")");
+                name.append(" \u200E(").append(node.getCoor().latToString(CoordinateFormat.getDefaultFormat())).append(", ").append(node.getCoor().lonToString(CoordinateFormat.getDefaultFormat())).append(')');
             }
         }
         decorateNameWithId(name, node);
@@ -271,7 +271,7 @@
                nevertheless, who knows what future brings */
             /* I18n: count of nodes as parameter */
             String nodes = trn("{0} node", "{0} nodes", nodesNo, nodesNo);
-            name.append(" (").append(nodes).append(")");
+            name.append(" (").append(nodes).append(')');
         }
         decorateNameWithId(name, way);
 
@@ -319,7 +319,7 @@
                 name.append(", ").append(tr("incomplete"));
             }
 
-            name.append(")");
+            name.append(')');
         }
         decorateNameWithId(name, relation);
 
@@ -340,12 +340,12 @@
             if (relationName == null) {
                 relationName = Long.toString(relation.getId());
             } else {
-                relationName = "\"" + relationName + "\"";
+                relationName = '"' + relationName + '"';
             }
             result.append(" (").append(relationName).append(", ");
         } else {
             preset.nameTemplate.appendText(result, relation);
-            result.append("(");
+            result.append('(');
         }
     }
 
@@ -434,7 +434,7 @@
         }
         String admin_level = relation.get("admin_level");
         if (admin_level != null) {
-            name += "["+admin_level+"]";
+            name += '[' +admin_level+ ']';
         }
 
         for (NameFormatterHook hook: formatHooks) {
@@ -509,7 +509,7 @@
             sb.append("<strong>")
             .append(key)
             .append("</strong>")
-            .append("=");
+            .append('=');
             String value = primitive.get(key);
             while(value.length() != 0) {
                 sb.append(value.substring(0,Math.min(50, value.length())));
@@ -565,7 +565,7 @@
             .append(coord.latToString(CoordinateFormat.getDefaultFormat()))
             .append(", ")
             .append(coord.lonToString(CoordinateFormat.getDefaultFormat()))
-            .append(")");
+            .append(')');
         }
         decorateNameWithId(sb, node);
         return sb.toString();
@@ -607,7 +607,7 @@
         }
         /* 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);
+        sb.append((sb.length() > 0) ? " ("+nodes+ ')' : nodes);
         decorateNameWithId(sb, way);
         return sb.toString();
     }
@@ -647,11 +647,11 @@
         if (nameTag == null) {
             sb.append(Long.toString(relation.getId())).append(", ");
         } else {
-            sb.append("\"").append(nameTag).append("\", ");
+            sb.append('"').append(nameTag).append("\", ");
         }
 
         int mbno = relation.getNumMembers();
-        sb.append(trn("{0} member", "{0} members", mbno, mbno)).append(")");
+        sb.append(trn("{0} member", "{0} members", mbno, mbno)).append(')');
 
         decorateNameWithId(sb, relation);
         return sb.toString();
@@ -679,7 +679,7 @@
             sb.append("<strong>")
             .append(key)
             .append("</strong>")
-            .append("=");
+            .append('=');
             String value = primitive.get(key);
             while(value.length() != 0) {
                 sb.append(value.substring(0,Math.min(50, value.length())));
Index: org/openstreetmap/josm/gui/ExtendedDialog.java
===================================================================
--- org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 6082)
+++ org/openstreetmap/josm/gui/ExtendedDialog.java	(working copy)
@@ -572,7 +572,7 @@
      * @return true if dialog should not be shown again
      */
     private boolean toggleCheckState(String togglePref) {
-        toggleable = togglePref != null && !togglePref.equals("");
+        toggleable = togglePref != null && !togglePref.isEmpty();
 
         toggleValue = Main.pref.getInteger("message."+togglePref+".value", -1);
         // No identifier given, so return false (= show the dialog)
Index: org/openstreetmap/josm/gui/GettingStarted.java
===================================================================
--- org/openstreetmap/josm/gui/GettingStarted.java	(revision 6082)
+++ org/openstreetmap/josm/gui/GettingStarted.java	(working copy)
@@ -156,7 +156,7 @@
             String im = m.group(1);
             URL u = getClass().getResource(im);
             if (u != null) {
-                m.appendReplacement(sb, Matcher.quoteReplacement("src=\"" + u.toString() + "\""));
+                m.appendReplacement(sb, Matcher.quoteReplacement("src=\"" + u.toString() + '"'));
             }
         }
         m.appendTail(sb);
Index: org/openstreetmap/josm/gui/JosmUserIdentityManager.java
===================================================================
--- org/openstreetmap/josm/gui/JosmUserIdentityManager.java	(revision 6082)
+++ org/openstreetmap/josm/gui/JosmUserIdentityManager.java	(working copy)
@@ -101,7 +101,7 @@
      */
     public void setPartiallyIdentified(String userName) throws IllegalArgumentException {
         CheckParameterUtil.ensureParameterNotNull(userName, "userName");
-        if (userName.trim().equals(""))
+        if (userName.trim().isEmpty())
             throw new IllegalArgumentException(MessageFormat.format("Expected non-empty value for parameter ''{0}'', got ''{1}''", "userName", userName));
         this.userName = userName;
         userInfo = null;
@@ -119,7 +119,7 @@
      */
     public void setFullyIdentified(String username, UserInfo userinfo) throws IllegalArgumentException {
         CheckParameterUtil.ensureParameterNotNull(username, "username");
-        if (username.trim().equals(""))
+        if (username.trim().isEmpty())
             throw new IllegalArgumentException(tr("Expected non-empty value for parameter ''{0}'', got ''{1}''", "userName", userName));
         CheckParameterUtil.ensureParameterNotNull(userinfo, "userinfo");
         this.userName = username;
@@ -191,7 +191,7 @@
     public void initFromPreferences() {
         String userName = CredentialsManager.getInstance().getUsername();
         if (isAnonymous()) {
-            if (userName != null && ! userName.trim().equals("")) {
+            if (userName != null && !userName.trim().isEmpty()) {
                 setPartiallyIdentified(userName);
             }
         } else {
@@ -254,7 +254,7 @@
         } else if (evt.getKey().equals("osm-server.url")) {
             if (!(evt.getNewValue() instanceof StringSetting)) return;
             String newValue = ((StringSetting) evt.getNewValue()).getValue();
-            if (newValue == null || newValue.trim().equals("")) {
+            if (newValue == null || newValue.trim().isEmpty()) {
                 setAnonymous();
             } else if (isFullyIdentified()) {
                 setPartiallyIdentified(getUserName());
Index: org/openstreetmap/josm/gui/MainApplet.java
===================================================================
--- org/openstreetmap/josm/gui/MainApplet.java	(revision 6082)
+++ org/openstreetmap/josm/gui/MainApplet.java	(working copy)
@@ -79,7 +79,7 @@
             }
         }
         if (!args.containsKey("geometry") && getParameter("width") != null && getParameter("height") != null) {
-            args.put("geometry", Arrays.asList(new String[]{getParameter("width")+"x"+getParameter("height")}));
+            args.put("geometry", Arrays.asList(new String[]{getParameter("width")+ 'x' +getParameter("height")}));
         }
     }
 
@@ -119,10 +119,10 @@
                 p.add(pass, GBC.eol().fill(GBC.HORIZONTAL));
                 JOptionPane.showMessageDialog(null, p);
                 username = user.getText();
-                if("".equals(username))
+                if(username != null && username.isEmpty())
                     username = null;
                 password = new String(pass.getPassword());
-                if("".equals(password))
+                if(password != null && password.isEmpty())
                     password = null;
             }
             if (username != null && password != null) {
Index: org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- org/openstreetmap/josm/gui/MainApplication.java	(revision 6082)
+++ org/openstreetmap/josm/gui/MainApplication.java	(working copy)
@@ -100,15 +100,15 @@
                 tr("usage")+":\n"+
                 "\tjava -jar josm.jar <options>...\n\n"+
                 tr("options")+":\n"+
-                "\t--help|-h                                 "+tr("Show this help")+"\n"+
-                "\t--geometry=widthxheight(+|-)x(+|-)y       "+tr("Standard unix geometry argument")+"\n"+
-                "\t[--download=]minlat,minlon,maxlat,maxlon  "+tr("Download the bounding box")+"\n"+
-                "\t[--download=]<URL>                        "+tr("Download the location at the URL (with lat=x&lon=y&zoom=z)")+"\n"+
-                "\t[--download=]<filename>                   "+tr("Open a file (any file type that can be opened with File/Open)")+"\n"+
-                "\t--downloadgps=minlat,minlon,maxlat,maxlon "+tr("Download the bounding box as raw GPS")+"\n"+
-                "\t--downloadgps=<URL>                       "+tr("Download the location at the URL (with lat=x&lon=y&zoom=z) as raw GPS")+"\n"+
-                "\t--selection=<searchstring>                "+tr("Select with the given search")+"\n"+
-                "\t--[no-]maximize                           "+tr("Launch in maximized mode")+"\n"+
+                "\t--help|-h                                 "+tr("Show this help")+ '\n' +
+                "\t--geometry=widthxheight(+|-)x(+|-)y       "+tr("Standard unix geometry argument")+ '\n' +
+                "\t[--download=]minlat,minlon,maxlat,maxlon  "+tr("Download the bounding box")+ '\n' +
+                "\t[--download=]<URL>                        "+tr("Download the location at the URL (with lat=x&lon=y&zoom=z)")+ '\n' +
+                "\t[--download=]<filename>                   "+tr("Open a file (any file type that can be opened with File/Open)")+ '\n' +
+                "\t--downloadgps=minlat,minlon,maxlat,maxlon "+tr("Download the bounding box as raw GPS")+ '\n' +
+                "\t--downloadgps=<URL>                       "+tr("Download the location at the URL (with lat=x&lon=y&zoom=z) as raw GPS")+ '\n' +
+                "\t--selection=<searchstring>                "+tr("Select with the given search")+ '\n' +
+                "\t--[no-]maximize                           "+tr("Launch in maximized mode")+ '\n' +
                 "\t--reset-preferences                       "+tr("Reset the preferences to default")+"\n\n"+
                 "\t--load-preferences=<url-to-xml>           "+tr("Changes preferences according to the XML file")+"\n\n"+
                 "\t--set=<key>=<value>                       "+tr("Set preference key to value")+"\n\n"+
@@ -126,8 +126,8 @@
                         "\tjava -jar josm.jar 43.2,11.1,43.4,11.4\n"+
                         "\tjava -Djosm.home=/home/user/.josm_dev -jar josm.jar\n"+
                         "\tjava -Xmx400m -jar josm.jar\n\n"+
-                        tr("Parameters --download, --downloadgps, and --selection are processed in this order.")+"\n"+
-                        tr("Make sure you load some data if you use --selection.")+"\n"
+                        tr("Parameters --download, --downloadgps, and --selection are processed in this order.")+ '\n' +
+                        tr("Make sure you load some data if you use --selection.")+ '\n'
                 );
     }
 
@@ -180,7 +180,7 @@
             los.add(new LongOpt(o.getName(), o.requiresArgument() ? LongOpt.REQUIRED_ARGUMENT : LongOpt.NO_ARGUMENT, null, 0));
         }
 
-        Getopt g = new Getopt("JOSM", args, "hv", los.toArray(new LongOpt[0]));
+        Getopt g = new Getopt("JOSM", args, "hv", los.toArray(new LongOpt[los.size()]));
 
         Map<Option, Collection<String>> argMap = new HashMap<Option, Collection<String>>();
 
Index: org/openstreetmap/josm/gui/MapStatus.java
===================================================================
--- org/openstreetmap/josm/gui/MapStatus.java	(revision 6082)
+++ org/openstreetmap/josm/gui/MapStatus.java	(working copy)
@@ -535,15 +535,15 @@
             // fix #7557 - do not show ID twice
 
             if (!osm.isNew() && !idShown) {
-                text.append(" [id="+osm.getId()+"]");
+                text.append(" [id=").append(osm.getId()).append(']');
             }
 
             if(osm.getUser() != null) {
-                text.append(" [" + tr("User:") + " " + osm.getUser().getName() + "]");
+                text.append(" [").append(tr("User:")).append(' ').append(osm.getUser().getName()).append(']');
             }
 
             for (String key : osm.keySet()) {
-                text.append("<br>" + key + "=" + osm.get(key));
+                text.append("<br>").append(key).append('=').append(osm.get(key));
             }
 
             final JLabel l = new JLabel(
Index: org/openstreetmap/josm/gui/MultiSplitLayout.java
===================================================================
--- org/openstreetmap/josm/gui/MultiSplitLayout.java	(revision 6082)
+++ org/openstreetmap/josm/gui/MultiSplitLayout.java	(working copy)
@@ -1054,7 +1054,7 @@
             int nChildren = getChildren().size();
             StringBuffer sb = new StringBuffer("MultiSplitLayout.Split");
             sb.append(isRowLayout() ? " ROW [" : " COLUMN [");
-            sb.append(nChildren + ((nChildren == 1) ? " child" : " children"));
+            sb.append(nChildren).append((nChildren == 1) ? " child" : " children");
             sb.append("] ");
             sb.append(getBounds());
             return sb.toString();
@@ -1110,10 +1110,10 @@
             StringBuffer sb = new StringBuffer("MultiSplitLayout.Leaf");
             sb.append(" \"");
             sb.append(getName());
-            sb.append("\"");
+            sb.append('"');
             sb.append(" weight=");
             sb.append(getWeight());
-            sb.append(" ");
+            sb.append(' ');
             sb.append(getBounds());
             return sb.toString();
         }
@@ -1181,7 +1181,7 @@
             }
         }
         else {
-            throwParseException(st, "unrecognized attribute \"" + name + "\"");
+            throwParseException(st, "unrecognized attribute \"" + name + '"');
         }
     }
 
@@ -1243,7 +1243,7 @@
                     parseSplit(st, split);
                 }
                 else {
-                    throwParseException(st, "unrecognized node type '" + nodeType + "'");
+                    throwParseException(st, "unrecognized node type '" + nodeType + '\'');
                 }
             }
         }
Index: org/openstreetmap/josm/gui/NavigatableComponent.java
===================================================================
--- org/openstreetmap/josm/gui/NavigatableComponent.java	(revision 6082)
+++ org/openstreetmap/josm/gui/NavigatableComponent.java	(working copy)
@@ -1351,8 +1351,8 @@
      * Return a ID which is unique as long as viewport dimensions are the same
      */
     public int getViewID() {
-        String x = center.east() + "_" + center.north() + "_" + scale + "_" +
-                getWidth() + "_" + getHeight() + "_" + getProjection().toString();
+        String x = center.east() + "_" + center.north() + '_' + scale + '_' +
+                getWidth() + '_' + getHeight() + '_' + getProjection().toString();
         java.util.zip.CRC32 id = new java.util.zip.CRC32();
         id.update(x.getBytes());
         return (int)id.getValue();
@@ -1475,11 +1475,11 @@
             if ((!lowerOnly && areaCustomValue > 0 && a > areaCustomValue / (aValue*aValue) && a < (bValue*bValue) / (aValue*aValue)) || customAreaOnly)
                 return formatText(area / areaCustomValue, areaCustomName);
             else if (!lowerOnly && a >= (bValue*bValue) / (aValue*aValue))
-                return formatText(area / (bValue*bValue), bName+"\u00b2");
+                return formatText(area / (bValue*bValue), bName+ '\u00b2');
             else if (a < 0.01)
-                return "< 0.01 " + aName+"\u00b2";
+                return "< 0.01 " + aName+ '\u00b2';
             else
-                return formatText(a, aName+"\u00b2");
+                return formatText(a, aName+ '\u00b2');
         }
 
         private static String formatText(double v, String unit) {
Index: org/openstreetmap/josm/gui/SideButton.java
===================================================================
--- org/openstreetmap/josm/gui/SideButton.java	(revision 6082)
+++ org/openstreetmap/josm/gui/SideButton.java	(working copy)
@@ -88,7 +88,7 @@
         setActionCommand(name);
         addActionListener(actionListener);
         setToolTipText(tooltip);
-        putClientProperty("help", "Dialog/"+property+"/"+name);
+        putClientProperty("help", "Dialog/"+property+ '/' +name);
     }
 
     private void doStyle()
Index: org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java
===================================================================
--- org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java	(revision 6082)
+++ org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java	(working copy)
@@ -593,7 +593,7 @@
         public boolean isValid() {
             String value = getComponent().getText().trim();
             try {
-                if (value.equals("")) {
+                if (value.isEmpty()) {
                     tileIndex = 0;
                 } else {
                     tileIndex = Integer.parseInt(value);
@@ -644,8 +644,8 @@
         @Override
         public String toString() {
             StringBuffer sb = new StringBuffer();
-            sb.append("min=").append(min.x).append(",").append(min.y).append(",");
-            sb.append("max=").append(max.x).append(",").append(max.y).append(",");
+            sb.append("min=").append(min.x).append(',').append(min.y).append(',');
+            sb.append("max=").append(max.x).append(',').append(max.y).append(',');
             sb.append("zoom=").append(zoomLevel);
             return sb.toString();
         }
Index: org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListTableCellRenderer.java
===================================================================
--- org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListTableCellRenderer.java	(revision 6082)
+++ org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListTableCellRenderer.java	(working copy)
@@ -67,7 +67,7 @@
             sb.append("<strong>")
             .append(key)
             .append("</strong>")
-            .append("=");
+            .append('=');
             // make sure long values are split into several rows. Otherwise
             // the tool tip window can become to wide
             //
Index: org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMerger.java
===================================================================
--- org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMerger.java	(revision 6082)
+++ org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMerger.java	(working copy)
@@ -290,11 +290,11 @@
         if (coord == null)
             return tr("(none)");
         StringBuilder sb = new StringBuilder();
-        sb.append("(")
+        sb.append('(')
         .append(COORD_FORMATTER.format(coord.lat()))
-        .append(",")
+        .append(',')
         .append(COORD_FORMATTER.format(coord.lon()))
-        .append(")");
+        .append(')');
         return sb.toString();
     }
 
Index: org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellRenderer.java
===================================================================
--- org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellRenderer.java	(revision 6082)
+++ org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellRenderer.java	(working copy)
@@ -52,7 +52,7 @@
             sb.append("<strong>")
             .append(key)
             .append("</strong>")
-            .append("=");
+            .append('=');
             String value = primitive.get(key);
             while(value.length() != 0) {
                 sb.append(value.substring(0,Math.min(50, value.length())));
Index: org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java
===================================================================
--- org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java	(revision 6082)
+++ org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java	(working copy)
@@ -457,7 +457,7 @@
                 case WAY: msg = trn("{0} way", "{0} ways", numPrimitives, numPrimitives); break;
                 case RELATION: msg = trn("{0} relation", "{0} relations", numPrimitives, numPrimitives); break;
                 }
-                text = text.equals("") ? msg : text + ", " + msg;
+                text = text.isEmpty() ? msg : text + ", " + msg;
             }
             setText(text);
         }
Index: org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolver.java
===================================================================
--- org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolver.java	(revision 6082)
+++ org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolver.java	(working copy)
@@ -171,9 +171,9 @@
     public Command buildTagApplyCommands(Collection<? extends OsmPrimitive> primitives) {
         if (!cbTagRelations.isSelected())
             return null;
-        if (tfKey.getText().trim().equals(""))
+        if (tfKey.getText().trim().isEmpty())
             return null;
-        if (tfValue.getText().trim().equals(""))
+        if (tfValue.getText().trim().isEmpty())
             return null;
         if (primitives == null || primitives.isEmpty())
             return null;
Index: org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java
===================================================================
--- org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java	(revision 6082)
+++ org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java	(working copy)
@@ -353,7 +353,7 @@
             txtMappaint.append(tr("\n\nList of generated Styles:\n"));
             StyleList sl = elemstyles.get(osm, scale, nc);
             for (ElemStyle s : sl) {
-                txtMappaint.append(" * " + s + "\n");
+                txtMappaint.append(" * " + s + '\n');
             }
             txtMappaint.append("\n\n");
         }
Index: org/openstreetmap/josm/gui/dialogs/LatLonDialog.java
===================================================================
--- org/openstreetmap/josm/gui/dialogs/LatLonDialog.java	(revision 6082)
+++ org/openstreetmap/josm/gui/dialogs/LatLonDialog.java	(working copy)
@@ -58,7 +58,7 @@
     private static final Pattern p = Pattern.compile(
             "([+|-]?\\d+[.,]\\d+)|"             // (1)
             + "([+|-]?\\d+)|"                   // (2)
-            + "("+DEG+"|o|deg)|"                // (3)
+            + '(' +DEG+"|o|deg)|"                // (3)
             + "('|"+MIN+"|min)|"                // (4)
             + "(\"|"+SEC+"|sec)|"               // (5)
             + "(,|;)|"                          // (6)
@@ -179,7 +179,7 @@
             ll = new LatLon(0,0);
         }
         this.latLonCoordinates = ll;
-        tfLatLon.setText(ll.latToString(CoordinateFormat.getDefaultFormat()) + " " + ll.lonToString(CoordinateFormat.getDefaultFormat()));
+        tfLatLon.setText(ll.latToString(CoordinateFormat.getDefaultFormat()) + ' ' + ll.lonToString(CoordinateFormat.getDefaultFormat()));
         EastNorth en = Main.getProjection().latlon2eastNorth(ll);
         tfEastNorth.setText(en.east()+" "+en.north());
         setOkEnabled(true);
@@ -353,7 +353,7 @@
             } else if (m.group(6) != null) {
                 sb.append(',');     // separator
             } else if (m.group(7) != null) {
-                sb.append("x");     // cardinal direction
+                sb.append('x');     // cardinal direction
                 String c = m.group(7).toUpperCase();
                 if (c.equals("N") || c.equals("S") || c.equals("E") || c.equals("W")) {
                     list.add(c);
Index: org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java
===================================================================
--- org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java	(revision 6082)
+++ org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java	(working copy)
@@ -668,7 +668,7 @@
                 BufferedReader reader = new BufferedReader(new InputStreamReader(is));
                 String line;
                 while ((line = reader.readLine()) != null) {
-                    txtSource.append(line + "\n");
+                    txtSource.append(line + '\n');
                 }
             } catch (IOException ex) {
                 txtSource.append("<ERROR: failed to read file!>");
@@ -683,7 +683,7 @@
             txtErrors.setEditable(false);
             p.add(new JScrollPane(txtErrors), GBC.std().fill());
             for (Throwable t : s.getErrors()) {
-                txtErrors.append(t.toString() + "\n");
+                txtErrors.append(t.toString() + '\n');
             }
         }
     }
Index: org/openstreetmap/josm/gui/dialogs/UserListDialog.java
===================================================================
--- org/openstreetmap/josm/gui/dialogs/UserListDialog.java	(revision 6082)
+++ org/openstreetmap/josm/gui/dialogs/UserListDialog.java	(working copy)
@@ -214,7 +214,7 @@
         protected String createInfoUrl(Object infoObject) {
             User user = (User)infoObject;
             try {
-                return getBaseUserUrl() + "/" + URLEncoder.encode(user.getName(), "UTF-8").replaceAll("\\+", "%20");
+                return getBaseUserUrl() + '/' + URLEncoder.encode(user.getName(), "UTF-8").replaceAll("\\+", "%20");
             } catch(UnsupportedEncodingException e) {
                 e.printStackTrace();
                 JOptionPane.showMessageDialog(
Index: org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheTableCellRenderer.java
===================================================================
--- org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheTableCellRenderer.java	(revision 6082)
+++ org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheTableCellRenderer.java	(working copy)
@@ -47,7 +47,7 @@
 
     protected void renderUploadComment(Changeset cs) {
         String comment = cs.get("comment");
-        if (comment == null || comment.trim().equals("")) {
+        if (comment == null || comment.trim().isEmpty()) {
             setText(trc("changeset.upload-comment", "empty"));
             setFont(UIManager.getFont("Table.font").deriveFont(Font.ITALIC));
         } else {
@@ -68,7 +68,7 @@
 
     protected void renderUser(Changeset cs) {
         User user = cs.getUser();
-        if (user == null || user.getName().trim().equals("")) {
+        if (user == null || user.getName().trim().isEmpty()) {
             setFont(UIManager.getFont("Table.font").deriveFont(Font.ITALIC));
             setText(tr("anonymous"));
         } else {
Index: org/openstreetmap/josm/gui/dialogs/changeset/ChangesetListCellRenderer.java
===================================================================
--- org/openstreetmap/josm/gui/dialogs/changeset/ChangesetListCellRenderer.java	(revision 6082)
+++ org/openstreetmap/josm/gui/dialogs/changeset/ChangesetListCellRenderer.java	(working copy)
@@ -40,7 +40,7 @@
             sb.append(" - ");
             sb.append(cs.isOpen() ? tr("open") : tr("closed"));
             if (comment != null) {
-                sb.append(" - ").append("'").append(comment).append("'");
+                sb.append(" - ").append('\'').append(comment).append('\'');
             }
         }
         setText(sb.toString());
Index: org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanel.java
===================================================================
--- org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanel.java	(revision 6082)
+++ org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanel.java	(working copy)
@@ -182,7 +182,7 @@
 
         protected void validate() {
             String value = tfUrl.getText();
-            if (value.trim().equals("")) {
+            if (value.trim().isEmpty()) {
                 feedbackNone();
                 return;
             }
Index: org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
===================================================================
--- org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 6082)
+++ org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(working copy)
@@ -821,16 +821,16 @@
                     if (cur == last + 1) {
                         ++cnt;
                     } else if (cnt == 0) {
-                        positionString += "," + String.valueOf(cur);
+                        positionString += ',' + String.valueOf(cur);
                     } else {
-                        positionString += "-" + String.valueOf(last);
-                        positionString += "," + String.valueOf(cur);
+                        positionString += '-' + String.valueOf(last);
+                        positionString += ',' + String.valueOf(cur);
                         cnt = 0;
                     }
                     last = cur;
                 }
                 if (cnt >= 1) {
-                    positionString += "-" + String.valueOf(last);
+                    positionString += '-' + String.valueOf(last);
                 }
             }
             if (positionString.length() > 20) {
@@ -1048,7 +1048,7 @@
                             ((Relation)membershipData.getValueAt(row, 0)).get("type"), "UTF-8"
                             );
 
-                    if (type != null && !type.equals("")) {
+                    if (type != null && !type.isEmpty()) {
                         uris.add(new URI(String.format("%s%sRelation:%s", base, lang, type)));
                         uris.add(new URI(String.format("%sRelation:%s", base, type)));
                     }
@@ -1241,7 +1241,7 @@
                 } else if (p instanceof Relation) {
                     t = "type:relation ";
                 }
-                s += sep + "(" + t + "\"" +
+                s += sep + '(' + t + '"' +
                         org.openstreetmap.josm.actions.search.SearchAction.escapeStringForSearch(key) + "\"=\"" +
                         org.openstreetmap.josm.actions.search.SearchAction.escapeStringForSearch(val) + "\")";
                 sep = " OR ";
Index: org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java
===================================================================
--- org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java	(revision 6082)
+++ org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java	(working copy)
@@ -337,12 +337,12 @@
             String value = values.getEditor().getItem().toString().trim();
             // is not Java 1.5
             //value = java.text.Normalizer.normalize(value, java.text.Normalizer.Form.NFC);
-            if (value.equals("")) {
+            if (value.isEmpty()) {
                 value = null; // delete the key
             }
             String newkey = keys.getEditor().getItem().toString().trim();
             //newkey = java.text.Normalizer.normalize(newkey, java.text.Normalizer.Form.NFC);
-            if (newkey.equals("")) {
+            if (newkey.isEmpty()) {
                 newkey = key;
                 value = null; // delete the key instead
             }
Index: org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
===================================================================
--- org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(revision 6082)
+++ org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(working copy)
@@ -1572,7 +1572,7 @@
         }
 
         protected boolean isEmptyRole() {
-            return tfRole.getText() == null || tfRole.getText().trim().equals("");
+            return tfRole.getText() == null || tfRole.getText().trim().isEmpty();
         }
 
         protected boolean confirmSettingEmptyRole(int onNumMembers) {
Index: org/openstreetmap/josm/gui/dialogs/relation/RelationDialogManager.java
===================================================================
--- org/openstreetmap/josm/gui/dialogs/relation/RelationDialogManager.java	(revision 6082)
+++ org/openstreetmap/josm/gui/dialogs/relation/RelationDialogManager.java	(working copy)
@@ -86,7 +86,7 @@
 
         @Override
         public String toString() {
-            return "[Context: layer=" + layer.getName() + ",relation=" + relation.getId() + "]";
+            return "[Context: layer=" + layer.getName() + ",relation=" + relation.getId() + ']';
         }
     }
 
Index: org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionType.java
===================================================================
--- org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionType.java	(revision 6082)
+++ org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionType.java	(working copy)
@@ -69,7 +69,7 @@
     public String toString() {
         return "[P "+linkPrev+" ;N "+linkNext+" ;D "+direction+" ;L "+isLoop+
                 " ;FP " + isOnewayLoopForwardPart+";BP " + isOnewayLoopBackwardPart+
-                ";OH " + isOnewayHead+";OT " + isOnewayTail+"]";
+                ";OH " + isOnewayHead+";OT " + isOnewayTail+ ']';
     }
 
     public String getToolTip() {
Index: org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java
===================================================================
--- org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java	(revision 6082)
+++ org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java	(working copy)
@@ -210,7 +210,7 @@
             for (Entry<String, Set<TestError>> msgErrors : severityErrors.entrySet()) {
                 // Message node
                 Set<TestError> errs = msgErrors.getValue();
-                String msg = msgErrors.getKey() + " (" + errs.size() + ")";
+                String msg = msgErrors.getKey() + " (" + errs.size() + ')';
                 DefaultMutableTreeNode messageNode = new DefaultMutableTreeNode(msg);
                 severityNode.add(messageNode);
 
@@ -229,7 +229,7 @@
                 MultiMap<String, TestError> errorlist = bag.getValue();
                 DefaultMutableTreeNode groupNode = null;
                 if (errorlist.size() > 1) {
-                    String nmsg = bag.getKey() + " (" + errorlist.size() + ")";
+                    String nmsg = bag.getKey() + " (" + errorlist.size() + ')';
                     groupNode = new DefaultMutableTreeNode(nmsg);
                     severityNode.add(groupNode);
                     if (oldSelectedRows.contains(bag.getKey())) {
@@ -242,9 +242,9 @@
                     Set<TestError> errs = msgErrors.getValue();
                     String msg;
                     if (groupNode != null) {
-                        msg = msgErrors.getKey() + " (" + errs.size() + ")";
+                        msg = msgErrors.getKey() + " (" + errs.size() + ')';
                     } else {
-                        msg = msgErrors.getKey() + " - " + bag.getKey() + " (" + errs.size() + ")";
+                        msg = msgErrors.getKey() + " - " + bag.getKey() + " (" + errs.size() + ')';
                     }
                     DefaultMutableTreeNode messageNode = new DefaultMutableTreeNode(msg);
                     if (groupNode != null) {
Index: org/openstreetmap/josm/gui/download/BookmarkSelection.java
===================================================================
--- org/openstreetmap/josm/gui/download/BookmarkSelection.java	(revision 6082)
+++ org/openstreetmap/josm/gui/download/BookmarkSelection.java	(working copy)
@@ -197,7 +197,7 @@
                             JOptionPane.QUESTION_MESSAGE)
             );
             b.setArea(currentArea);
-            if (b.getName() != null && !b.getName().equals("")) {
+            if (b.getName() != null && !b.getName().isEmpty()) {
                 ((DefaultListModel)bookmarks.getModel()).addElement(b);
                 bookmarks.save();
             }
Index: org/openstreetmap/josm/gui/download/PlaceSelection.java
===================================================================
--- org/openstreetmap/josm/gui/download/PlaceSelection.java	(revision 6082)
+++ org/openstreetmap/josm/gui/download/PlaceSelection.java	(working copy)
@@ -511,9 +511,9 @@
                 if (line.length() == 0) {
                     line.append(t);
                 } else if (line.length() < 80) {
-                    line.append(" ").append(t);
+                    line.append(' ').append(t);
                 } else {
-                    line.append(" ").append(t).append("<br>");
+                    line.append(' ').append(t).append("<br>");
                     ret.append(line);
                     line = new StringBuffer();
                 }
Index: org/openstreetmap/josm/gui/help/HelpBrowser.java
===================================================================
--- org/openstreetmap/josm/gui/help/HelpBrowser.java	(revision 6082)
+++ org/openstreetmap/josm/gui/help/HelpBrowser.java	(working copy)
@@ -140,7 +140,7 @@
             String line = null;
             while ((line = reader.readLine()) != null) {
                 css.append(line);
-                css.append("\n");
+                css.append('\n');
             }
         } catch(Exception e) {
             System.err.println(tr("Failed to read CSS file ''help-browser.css''. Exception is: {0}", e.toString()));
@@ -583,7 +583,7 @@
         public void hyperlinkUpdate(HyperlinkEvent e) {
             if (e.getEventType() != HyperlinkEvent.EventType.ACTIVATED)
                 return;
-            if (e.getURL() == null || e.getURL().toString().startsWith(url+"#")) {
+            if (e.getURL() == null || e.getURL().toString().startsWith(url+ '#')) {
                 // Probably hyperlink event on a an A-element with a href consisting of
                 // a fragment only, i.e. "#ALocalFragment".
                 //
Index: org/openstreetmap/josm/gui/help/HelpUtil.java
===================================================================
--- org/openstreetmap/josm/gui/help/HelpUtil.java	(revision 6082)
+++ org/openstreetmap/josm/gui/help/HelpUtil.java	(working copy)
@@ -118,7 +118,7 @@
         String ret = LanguageInfo.getWikiLanguagePrefix(type);
         if(ret == null)
             return ret;
-        ret = "/" + ret + Main.pref.get("help.pathhelp", "/Help").replaceAll("^\\/+", ""); // remove leading /;
+        ret = '/' + ret + Main.pref.get("help.pathhelp", "/Help").replaceAll("^\\/+", ""); // remove leading /;
         return ret.replaceAll("\\/+", "\\/"); // collapse sequences of //
     }
 
@@ -137,7 +137,7 @@
         String prefix = getHelpTopicPrefix(type);
         if (prefix == null || topic == null || topic.trim().length() == 0 || topic.trim().equals("/"))
             return prefix;
-        prefix += "/" + topic;
+        prefix += '/' + topic;
         return prefix.replaceAll("\\/+", "\\/"); // collapse sequences of //
     }
 
Index: org/openstreetmap/josm/gui/history/VersionInfoPanel.java
===================================================================
--- org/openstreetmap/josm/gui/history/VersionInfoPanel.java	(revision 6082)
+++ org/openstreetmap/josm/gui/history/VersionInfoPanel.java	(working copy)
@@ -142,7 +142,7 @@
 
             try {
                 if (getPrimitive().getUser() != null && getPrimitive().getUser() != User.getAnonymous()) {
-                    url = AbstractInfoAction.getBaseUserUrl() + "/" +  URLEncoder.encode(getPrimitive().getUser().getName(), "UTF-8").replaceAll("\\+", "%20");
+                    url = AbstractInfoAction.getBaseUserUrl() + '/' +  URLEncoder.encode(getPrimitive().getUser().getName(), "UTF-8").replaceAll("\\+", "%20");
                     lblUser.setUrl(url);
                 } else {
                     lblUser.setUrl(null);
@@ -163,7 +163,7 @@
                 lblUser.setUrl(null);
             } else {
                 try {
-                    String url = AbstractInfoAction.getBaseUserUrl() + "/" +  URLEncoder.encode(user, "UTF-8").replaceAll("\\+", "%20");
+                    String url = AbstractInfoAction.getBaseUserUrl() + '/' +  URLEncoder.encode(user, "UTF-8").replaceAll("\\+", "%20");
                     lblUser.setUrl(url);
                 } catch(UnsupportedEncodingException e) {
                     e.printStackTrace();
Index: org/openstreetmap/josm/gui/io/CredentialDialog.java
===================================================================
--- org/openstreetmap/josm/gui/io/CredentialDialog.java	(revision 6082)
+++ org/openstreetmap/josm/gui/io/CredentialDialog.java	(working copy)
@@ -229,7 +229,7 @@
             password = password == null ? "" : password;
             tfUserName.setText(username);
             tfPassword.setText(password);
-            cbSaveCredentials.setSelected(!username.equals("") && ! password.equals(""));
+            cbSaveCredentials.setSelected(!username.isEmpty() && !password.isEmpty());
         }
 
         public void startUserInput() {
@@ -298,7 +298,7 @@
             tfPassword.setToolTipText(tr("Please enter the password for authenticating at your proxy server"));
             lblHeading.setText(
                     "<html>" + tr("Authenticating at the HTTP proxy ''{0}'' failed. Please enter a valid username and a valid password.",
-                            Main.pref.get(ProxyPreferencesPanel.PROXY_HTTP_HOST) + ":" + Main.pref.get(ProxyPreferencesPanel.PROXY_HTTP_PORT)) + "</html>");
+                            Main.pref.get(ProxyPreferencesPanel.PROXY_HTTP_HOST) + ':' + Main.pref.get(ProxyPreferencesPanel.PROXY_HTTP_PORT)) + "</html>");
             lblWarning.setText("<html>" + tr("Warning: depending on the authentication method the proxy server uses the password may be transferred unencrypted.") + "</html>");
         }
 
Index: org/openstreetmap/josm/gui/io/FilenameCellEditor.java
===================================================================
--- org/openstreetmap/josm/gui/io/FilenameCellEditor.java	(revision 6082)
+++ org/openstreetmap/josm/gui/io/FilenameCellEditor.java	(working copy)
@@ -107,7 +107,7 @@
     }
 
     public boolean stopCellEditing() {
-        if (tfFileName.getText() == null || tfFileName.getText().trim().equals("")) {
+        if (tfFileName.getText() == null || tfFileName.getText().trim().isEmpty()) {
             value = null;
         } else {
             value = new File(tfFileName.getText());
Index: org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java
===================================================================
--- org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java	(revision 6082)
+++ org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java	(working copy)
@@ -33,7 +33,7 @@
 class LayerNameAndFilePathTableCell extends JPanel implements TableCellRenderer, TableCellEditor {
     private final static Color colorError = new Color(255,197,197);
     private final static String separator = System.getProperty("file.separator");
-    private final static String ellipsis = "…" + separator;
+    private final static String ellipsis = '…' + separator;
 
     private final JLabel lblLayerName = new JLabel();
     private final JLabel lblFilename = new JLabel("");
@@ -216,7 +216,7 @@
     }
 
     public boolean stopCellEditing() {
-        if (tfFilename.getText() == null || tfFilename.getText().trim().equals("")) {
+        if (tfFilename.getText() == null || tfFilename.getText().trim().isEmpty()) {
             value = null;
         } else {
             value = new File(tfFilename.getText());
Index: org/openstreetmap/josm/gui/io/TagSettingsPanel.java
===================================================================
--- org/openstreetmap/josm/gui/io/TagSettingsPanel.java	(revision 6082)
+++ org/openstreetmap/josm/gui/io/TagSettingsPanel.java	(working copy)
@@ -55,7 +55,7 @@
         if (comment.equals(commentInTag))
             return;
 
-        if (comment.equals("")) {
+        if (comment.isEmpty()) {
             pnlTagEditor.getModel().delete("comment");
             return;
         }
@@ -88,7 +88,7 @@
         if (created_by == null || created_by.isEmpty()) {
             tags.put("created_by", agent);
         } else if (!created_by.contains(agent)) {
-            tags.put("created_by", created_by + ";" + agent);
+            tags.put("created_by", created_by + ';' + agent);
         }
         pnlTagEditor.getModel().initFromTags(tags);
     }
Index: org/openstreetmap/josm/gui/io/UploadParameterSummaryPanel.java
===================================================================
--- org/openstreetmap/josm/gui/io/UploadParameterSummaryPanel.java	(revision 6082)
+++ org/openstreetmap/josm/gui/io/UploadParameterSummaryPanel.java	(working copy)
@@ -47,13 +47,13 @@
                     uploadComment
             ));
         }
-        msg.append(" ");
+        msg.append(' ');
         if (closeChangesetAfterNextUpload) {
             msg.append(tr("The changeset is going to be <strong>closed</strong> after this upload"));
         } else {
             msg.append(tr("The changeset is <strong>left open</strong> after this upload"));
         }
-        msg.append(" (<a href=\"urn:changeset-configuration\">" + tr("configure changeset") + "</a>)");
+        msg.append(" (<a href=\"urn:changeset-configuration\">").append(tr("configure changeset")).append("</a>)");
         return msg.toString();
     }
 
@@ -116,7 +116,7 @@
                 f.isBold() ? "bold" : "normal",
                         f.isItalic() ? "italic" : "normal"
         );
-        rule = "body {" + rule + "}";
+        rule = "body {" + rule + '}';
         rule = MessageFormat.format(
                 "font-family: ''{0}'';font-size: {1,number}pt; font-weight: {2}; font-style: {3}",
                 f.getName(),
@@ -124,7 +124,7 @@
                 "bold",
                 f.isItalic() ? "italic" : "normal"
         );
-        rule = "strong {" + rule + "}";
+        rule = "strong {" + rule + '}';
         ss.addRule(rule);
         ss.addRule("a {text-decoration: underline; color: blue}");
         JosmHTMLEditorKit kit = new JosmHTMLEditorKit();
Index: org/openstreetmap/josm/gui/layer/GpxLayer.java
===================================================================
--- org/openstreetmap/josm/gui/layer/GpxLayer.java	(revision 6082)
+++ org/openstreetmap/josm/gui/layer/GpxLayer.java	(working copy)
@@ -152,7 +152,7 @@
 
             if (earliestDate.equals(latestDate)) {
                 DateFormat tf = DateFormat.getTimeInstance(DateFormat.SHORT);
-                ts += earliestDate + " ";
+                ts += earliestDate + ' ';
                 ts += tf.format(bounds[0]) + " - " + tf.format(bounds[1]);
             } else {
                 DateFormat dtf = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
@@ -183,12 +183,11 @@
         }
 
         if (data.tracks.size() > 0) {
-            info.append("<table><thead align='center'><tr><td colspan='5'>"
-                    + trn("{0} track", "{0} tracks", data.tracks.size(), data.tracks.size())
-                    + "</td></tr><tr align='center'><td>" + tr("Name") + "</td><td>"
-                    + tr("Description") + "</td><td>" + tr("Timespan")
-                    + "</td><td>" + tr("Length") + "</td><td>" + tr("URL")
-                    + "</td></tr></thead>");
+            info.append("<table><thead align='center'><tr><td colspan='5'>")
+                    .append(trn("{0} track", "{0} tracks", data.tracks.size(), data.tracks.size()))
+                    .append("</td></tr><tr align='center'><td>").append(tr("Name")).append("</td><td>")
+                    .append(tr("Description")).append("</td><td>").append(tr("Timespan")).append("</td><td>")
+                    .append(tr("Length")).append("</td><td>").append(tr("URL")).append("</td></tr></thead>");
 
             for (GpxTrack trk : data.tracks) {
                 info.append("<tr><td>");
@@ -197,7 +196,7 @@
                 }
                 info.append("</td><td>");
                 if (trk.getAttributes().containsKey("desc")) {
-                    info.append(" ").append(trk.getAttributes().get("desc"));
+                    info.append(' ').append(trk.getAttributes().get("desc"));
                 }
                 info.append("</td><td>");
                 info.append(getTimespanForTrack(trk));
Index: org/openstreetmap/josm/gui/layer/ImageryLayer.java
===================================================================
--- org/openstreetmap/josm/gui/layer/ImageryLayer.java	(revision 6082)
+++ org/openstreetmap/josm/gui/layer/ImageryLayer.java	(working copy)
@@ -133,7 +133,7 @@
                 panel.add(new UrlLabel(url), GBC.eol().insets(2, 5, 10, 0));
             }
             if (dx != 0.0 || dy != 0.0) {
-                panel.add(new JLabel(tr("Offset: ") + dx + ";" + dy), GBC.eol().insets(0, 5, 10, 0));
+                panel.add(new JLabel(tr("Offset: ") + dx + ';' + dy), GBC.eol().insets(0, 5, 10, 0));
             }
         }
         return panel;
Index: org/openstreetmap/josm/gui/layer/OsmDataLayer.java
===================================================================
--- org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 6082)
+++ org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(working copy)
@@ -460,17 +460,17 @@
 
         String nodeText = trn("{0} node", "{0} nodes", counter.nodes, counter.nodes);
         if (counter.deletedNodes > 0) {
-            nodeText += " ("+trn("{0} deleted", "{0} deleted", counter.deletedNodes, counter.deletedNodes)+")";
+            nodeText += " ("+trn("{0} deleted", "{0} deleted", counter.deletedNodes, counter.deletedNodes)+ ')';
         }
 
         String wayText = trn("{0} way", "{0} ways", counter.ways, counter.ways);
         if (counter.deletedWays > 0) {
-            wayText += " ("+trn("{0} deleted", "{0} deleted", counter.deletedWays, counter.deletedWays)+")";
+            wayText += " ("+trn("{0} deleted", "{0} deleted", counter.deletedWays, counter.deletedWays)+ ')';
         }
 
         String relationText = trn("{0} relation", "{0} relations", counter.relations, counter.relations);
         if (counter.deletedRelations > 0) {
-            relationText += " ("+trn("{0} deleted", "{0} deleted", counter.deletedRelations, counter.deletedRelations)+")";
+            relationText += " ("+trn("{0} deleted", "{0} deleted", counter.deletedRelations, counter.deletedRelations)+ ')';
         }
 
         p.add(new JLabel(tr("{0} consists of:", getName())), GBC.eol());
@@ -523,7 +523,7 @@
                 new ConsistencyTestAction(),
                 SeparatorLayerAction.INSTANCE,
                 new LayerListPopup.InfoAction(this)}));
-        return actions.toArray(new Action[0]);
+        return actions.toArray(new Action[actions.size()]);
     }
 
     public static GpxData toGpxData(DataSet data, File file) {
Index: org/openstreetmap/josm/gui/layer/WMSLayer.java
===================================================================
--- org/openstreetmap/josm/gui/layer/WMSLayer.java	(revision 6082)
+++ org/openstreetmap/josm/gui/layer/WMSLayer.java	(working copy)
@@ -953,7 +953,7 @@
             for (int i=0; i<threadCount; i++) {
                 Grabber grabber = getGrabber(i == 0 && threadCount > 1);
                 grabbers.add(grabber);
-                Thread t = new Thread(grabber, "WMS " + getName() + " " + i);
+                Thread t = new Thread(grabber, "WMS " + getName() + ' ' + i);
                 t.setDaemon(true);
                 t.start();
                 grabberThreads.add(t);
Index: org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
===================================================================
--- org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 6082)
+++ org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(working copy)
@@ -193,7 +193,7 @@
                     x.printStackTrace();
                     JOptionPane.showMessageDialog(
                             Main.parent,
-                            tr("Could not read \"{0}\"",sel.getName())+"\n"+x.getMessage(),
+                            tr("Could not read \"{0}\"",sel.getName())+ '\n' +x.getMessage(),
                             tr("Error"),
                             JOptionPane.ERROR_MESSAGE
                     );
@@ -898,7 +898,7 @@
                     ? (int)Math.floor(tz/2) + ":00"
                             : (int)Math.floor(tz/2) + ":30";
                     if(sldTimezone.getValue() < 0) {
-                        zone = "-" + zone;
+                        zone = '-' + zone;
                     }
 
                     lblTimezone.setText(tr("Timezone: {0}", zone));
Index: org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
===================================================================
--- org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(revision 6082)
+++ org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(working copy)
@@ -300,7 +300,7 @@
         entries.add(SeparatorLayerAction.INSTANCE);
         entries.add(new LayerListPopup.InfoAction(this));
 
-        return entries.toArray(new Action[0]);
+        return entries.toArray(new Action[entries.size()]);
 
     }
 
@@ -311,7 +311,7 @@
                 i++;
             }
         return trn("{0} image loaded.", "{0} images loaded.", data.size(), data.size())
-                + " " + trn("{0} was found to be GPS tagged.", "{0} were found to be GPS tagged.", i, i);
+                + ' ' + trn("{0} was found to be GPS tagged.", "{0} were found to be GPS tagged.", i, i);
     }
 
     @Override public Object getInfoComponent() {
Index: org/openstreetmap/josm/gui/layer/geoimage/ImageDisplay.java
===================================================================
--- org/openstreetmap/josm/gui/layer/geoimage/ImageDisplay.java	(revision 6082)
+++ org/openstreetmap/josm/gui/layer/geoimage/ImageDisplay.java	(working copy)
@@ -529,7 +529,7 @@
                 int ascent = metrics.getAscent();
                 Color bkground = new Color(255, 255, 255, 128);
                 int lastPos = 0;
-                int pos = osdText.indexOf("\n");
+                int pos = osdText.indexOf('\n');
                 int x = 3;
                 int y = 3;
                 String line;
@@ -542,7 +542,7 @@
                     g.drawString(line, x, y + ascent);
                     y += (int) lineSize.getHeight();
                     lastPos = pos + 1;
-                    pos = osdText.indexOf("\n", lastPos);
+                    pos = osdText.indexOf('\n', lastPos);
                 }
 
                 line = osdText.substring(lastPos);
Index: org/openstreetmap/josm/gui/layer/geoimage/ThumbsLoader.java
===================================================================
--- org/openstreetmap/josm/gui/layer/geoimage/ThumbsLoader.java	(revision 6082)
+++ org/openstreetmap/josm/gui/layer/geoimage/ThumbsLoader.java	(working copy)
@@ -65,7 +65,7 @@
     }
 
     private BufferedImage loadThumb(ImageEntry entry) {
-        final String cacheIdent = entry.getFile().toString()+":"+maxSize;
+        final String cacheIdent = entry.getFile().toString() + ':' + maxSize;
 
         if (!cacheOff) {
             BufferedImage cached = cache.getImg(cacheIdent);
Index: org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java
===================================================================
--- org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java	(revision 6082)
+++ org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java	(working copy)
@@ -248,7 +248,7 @@
                         (startTime - w1.time) / (w2.time - w1.time)));
                 wayPointFromTimeStamp.time = startTime;
                 String name = wavFile.getName();
-                int dot = name.lastIndexOf(".");
+                int dot = name.lastIndexOf('.');
                 if (dot > 0) {
                     name = name.substring(0, dot);
                 }
Index: org/openstreetmap/josm/gui/layer/markerlayer/Marker.java
===================================================================
--- org/openstreetmap/josm/gui/layer/markerlayer/Marker.java	(revision 6082)
+++ org/openstreetmap/josm/gui/layer/markerlayer/Marker.java	(working copy)
@@ -103,7 +103,7 @@
         public static TemplateEntryProperty forMarker(String layerName) {
             String key = "draw.rawgps.layer.wpt.pattern";
             if (layerName != null) {
-                key += "." + layerName;
+                key += '.' + layerName;
             }
             TemplateEntryProperty result = cache.get(key);
             if (result == null) {
@@ -122,7 +122,7 @@
         public static TemplateEntryProperty forAudioMarker(String layerName) {
             String key = "draw.rawgps.layer.audiowpt.pattern";
             if (layerName != null) {
-                key += "." + layerName;
+                key += '.' + layerName;
             }
             TemplateEntryProperty result = cache.get(key);
             if (result == null) {
Index: org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java
===================================================================
--- org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java	(revision 6082)
+++ org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java	(working copy)
@@ -251,7 +251,7 @@
         components.add(new RenameLayerAction(getAssociatedFile(), this));
         components.add(SeparatorLayerAction.INSTANCE);
         components.add(new LayerListPopup.InfoAction(this));
-        return components.toArray(new Action[0]);
+        return components.toArray(new Action[components.size()]);
     }
 
     public boolean synchronizeAudioMarkers(AudioMarker startMarker) {
Index: org/openstreetmap/josm/gui/layer/markerlayer/WebMarker.java
===================================================================
--- org/openstreetmap/josm/gui/layer/markerlayer/WebMarker.java	(revision 6082)
+++ org/openstreetmap/josm/gui/layer/markerlayer/WebMarker.java	(working copy)
@@ -37,7 +37,7 @@
             JOptionPane.showMessageDialog(Main.parent,
                     "<html><b>" +
                             tr("There was an error while trying to display the URL for this marker") +
-                            "</b><br>" + tr("(URL was: ") + webUrl.toString() + ")" + "<br>" + error,
+                            "</b><br>" + tr("(URL was: ") + webUrl.toString() + ')' + "<br>" + error,
                             tr("Error displaying URL"), JOptionPane.ERROR_MESSAGE);
         }
     }
Index: org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java
===================================================================
--- org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java	(revision 6082)
+++ org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java	(working copy)
@@ -222,7 +222,7 @@
 
     @Override
     public String toString() {
-        return "BoxTextElemStyle{" + super.toString() + " " + text.toStringImpl() + " box=" + box + " hAlign=" + hAlign + " vAlign=" + vAlign + '}';
+        return "BoxTextElemStyle{" + super.toString() + ' ' + text.toStringImpl() + " box=" + box + " hAlign=" + hAlign + " vAlign=" + vAlign + '}';
     }
 
 }
Index: org/openstreetmap/josm/gui/mappaint/Cascade.java
===================================================================
--- org/openstreetmap/josm/gui/mappaint/Cascade.java	(revision 6082)
+++ org/openstreetmap/josm/gui/mappaint/Cascade.java	(working copy)
@@ -192,18 +192,18 @@
     public String toString() {
         StringBuilder res = new StringBuilder("Cascade{ ");
         for (String key : prop.keySet()) {
-            res.append(key+":");
+            res.append(key).append(':');
             Object val = prop.get(key);
             if (val instanceof float[]) {
                 res.append(Arrays.toString((float[]) val));
             } else if (val instanceof Color) {
                 res.append(Utils.toString((Color)val));
             } else {
-                res.append(val+"");
+                res.append(val);
             }
             res.append("; ");
         }
-        return res.append("}").toString();
+        return res.append('}').toString();
     }
 
     public boolean containsKey(String key) {
Index: org/openstreetmap/josm/gui/mappaint/LabelCompositionStrategy.java
===================================================================
--- org/openstreetmap/josm/gui/mappaint/LabelCompositionStrategy.java	(revision 6082)
+++ org/openstreetmap/josm/gui/mappaint/LabelCompositionStrategy.java	(working copy)
@@ -63,7 +63,7 @@
 
         @Override
         public String toString() {
-            return "{"  + getClass().getSimpleName() + " defaultLabel=" + defaultLabel + "}";
+            return '{' + getClass().getSimpleName() + " defaultLabel=" + defaultLabel + '}';
         }
 
         @Override
@@ -118,7 +118,7 @@
 
         @Override
         public String toString() {
-            return "{" + getClass().getSimpleName() + " defaultLabelTag=" + defaultLabelTag + "}";
+            return '{' + getClass().getSimpleName() + " defaultLabelTag=" + defaultLabelTag + '}';
         }
 
         @Override
@@ -240,7 +240,7 @@
 
         @Override
         public String toString() {
-            return "{" + getClass().getSimpleName() +"}";
+            return '{' + getClass().getSimpleName() + '}';
         }
     }
 }
Index: org/openstreetmap/josm/gui/mappaint/LineTextElemStyle.java
===================================================================
--- org/openstreetmap/josm/gui/mappaint/LineTextElemStyle.java	(revision 6082)
+++ org/openstreetmap/josm/gui/mappaint/LineTextElemStyle.java	(working copy)
@@ -52,7 +52,7 @@
 
     @Override
     public String toString() {
-        return "LineTextElemStyle{" + super.toString() + "text=" + text + "}";
+        return "LineTextElemStyle{" + super.toString() + "text=" + text + '}';
     }
 
 }
Index: org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
===================================================================
--- org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java	(revision 6082)
+++ org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java	(working copy)
@@ -164,7 +164,7 @@
         for(String fileset : prefIconDirs)
         {
             String[] a;
-            if(fileset.indexOf("=") >= 0) {
+            if(fileset.indexOf('=') >= 0) {
                 a = fileset.split("=", 2);
             } else {
                 a = new String[] {"", fileset};
Index: org/openstreetmap/josm/gui/mappaint/NodeElemStyle.java
===================================================================
--- org/openstreetmap/josm/gui/mappaint/NodeElemStyle.java	(revision 6082)
+++ org/openstreetmap/josm/gui/mappaint/NodeElemStyle.java	(working copy)
@@ -347,10 +347,10 @@
         StringBuilder s = new StringBuilder("NodeElemStyle{");
         s.append(super.toString());
         if (mapImage != null) {
-            s.append(" icon=[" + mapImage + "]");
+            s.append(" icon=[").append(mapImage).append(']');
         }
         if (symbol != null) {
-            s.append(" symbol=[" + symbol + "]");
+            s.append(" symbol=[").append(symbol).append(']');
         }
         s.append('}');
         return s.toString();
Index: org/openstreetmap/josm/gui/mappaint/RepeatImageElemStyle.java
===================================================================
--- org/openstreetmap/josm/gui/mappaint/RepeatImageElemStyle.java	(revision 6082)
+++ org/openstreetmap/josm/gui/mappaint/RepeatImageElemStyle.java	(working copy)
@@ -91,6 +91,6 @@
     public String toString() {
         return "RepeatImageStyle{" + super.toString() + "pattern=[" + pattern +
                 "], offset=" + offset + ", spacing=" + spacing +
-                ", phase=" + (-phase) + ", align=" + align + "}";
+                ", phase=" + (-phase) + ", align=" + align + '}';
     }
 }
Index: org/openstreetmap/josm/gui/mappaint/TextElement.java
===================================================================
--- org/openstreetmap/josm/gui/mappaint/TextElement.java	(revision 6082)
+++ org/openstreetmap/josm/gui/mappaint/TextElement.java	(working copy)
@@ -177,18 +177,18 @@
 
     protected String toStringImpl() {
         StringBuilder sb = new StringBuilder();
-        sb.append("labelCompositionStrategy=" + labelCompositionStrategy);
-        sb.append(" font=" + font);
+        sb.append("labelCompositionStrategy=").append(labelCompositionStrategy);
+        sb.append(" font=").append(font);
         if (xOffset != 0) {
-            sb.append(" xOffset=" + xOffset);
+            sb.append(" xOffset=").append(xOffset);
         }
         if (yOffset != 0) {
-            sb.append(" yOffset=" + yOffset);
+            sb.append(" yOffset=").append(yOffset);
         }
-        sb.append(" color=" + Utils.toString(color));
+        sb.append(" color=").append(Utils.toString(color));
         if (haloRadius != null) {
-            sb.append(" haloRadius=" + haloRadius);
-            sb.append(" haloColor=" + haloColor);
+            sb.append(" haloRadius=").append(haloRadius);
+            sb.append(" haloColor=").append(haloColor);
         }
         return sb.toString();
     }
Index: org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java
===================================================================
--- org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java	(revision 6082)
+++ org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java	(working copy)
@@ -163,7 +163,7 @@
 
         @Override
         public String toString() {
-            return "[" + k + "'" + op + "'" + v + "]";
+            return '[' + k + '\'' + op + '\'' + v + ']';
         }
     }
 
@@ -251,7 +251,7 @@
 
         @Override
         public String toString() {
-            return "[" + (exclamationMarkPresent ? "!" : "") + label + "]";
+            return '[' + (exclamationMarkPresent ? "!" : "") + label + ']';
         }
     }
 
@@ -290,7 +290,7 @@
 
         @Override
         public String toString() {
-            return ":" + (not ? "!" : "") + id;
+            return ':' + (not ? "!" : "") + id;
         }
     }
 
@@ -310,7 +310,7 @@
 
         @Override
         public String toString() {
-            return "[" + e + "]";
+            return "[" + e + ']';
         }
     }
 }
Index: org/openstreetmap/josm/gui/mappaint/mapcss/LiteralExpression.java
===================================================================
--- org/openstreetmap/josm/gui/mappaint/mapcss/LiteralExpression.java	(revision 6082)
+++ org/openstreetmap/josm/gui/mappaint/mapcss/LiteralExpression.java	(working copy)
@@ -27,7 +27,7 @@
         if (literal instanceof float[]) {
             return Arrays.toString((float[]) literal);
         }
-        return "<" + literal.toString() + ">";
+        return '<' + literal.toString() + '>';
     }
 
 }
Index: org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
===================================================================
--- org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java	(revision 6082)
+++ org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java	(working copy)
@@ -192,7 +192,7 @@
 
         @Override
         public String toString() {
-            return left +" "+ (parentSelector? "<" : ">")+link+" " +right;
+            return left +" "+ (parentSelector? "<" : ">")+link+ ' ' +right;
         }
     }
 
Index: org/openstreetmap/josm/gui/mappaint/xml/XmlCondition.java
===================================================================
--- org/openstreetmap/josm/gui/mappaint/xml/XmlCondition.java	(revision 6082)
+++ org/openstreetmap/josm/gui/mappaint/xml/XmlCondition.java	(working copy)
@@ -22,11 +22,11 @@
     public String getKey()
     {
         if(value != null)
-            return "n" + key + "=" + value;
+            return 'n' + key + '=' + value;
         else if(boolValue != null)
-            return "b" + key  + "=" + OsmUtils.getNamedOsmBoolean(boolValue);
+            return 'b' + key  + '=' + OsmUtils.getNamedOsmBoolean(boolValue);
         else
-            return "x" + key;
+            return 'x' + key;
     }
     public void init()
     {
@@ -35,10 +35,10 @@
 
     public String toString()
     {
-      return "Rule["+key+","+(boolValue != null ? "b="+boolValue:"v="+value)+"]";
+      return "Rule["+key+ ',' +(boolValue != null ? "b="+boolValue:"v="+value)+ ']';
     }
     public String toCode()
     {
-      return "[k="+key+(boolValue != null ? ",b="+boolValue:",v="+value)+"]";
+      return "[k="+key+(boolValue != null ? ",b="+boolValue:",v="+value)+ ']';
     }
 }
Index: org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java
===================================================================
--- org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java	(revision 6082)
+++ org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java	(working copy)
@@ -142,13 +142,13 @@
         for (String key : primitive.keySet()) {
             String val = primitive.get(key);
             IconPrototype p;
-            if ((p = icons.get("n" + key + "=" + val)) != null) {
+            if ((p = icons.get('n' + key + '=' + val)) != null) {
                 icon = update(icon, p, scale, mc);
             }
-            if ((p = icons.get("b" + key + "=" + OsmUtils.getNamedOsmBoolean(val))) != null) {
+            if ((p = icons.get('b' + key + '=' + OsmUtils.getNamedOsmBoolean(val))) != null) {
                 icon = update(icon, p, scale, mc);
             }
-            if ((p = icons.get("x" + key)) != null) {
+            if ((p = icons.get('x' + key)) != null) {
                 icon = update(icon, p, scale, mc);
             }
         }
@@ -175,7 +175,7 @@
             AreaPrototype styleArea;
             LinePrototype styleLine;
             LinemodPrototype styleLinemod;
-            String idx = "n" + key + "=" + val;
+            String idx = 'n' + key + '=' + val;
             if ((styleArea = areas.get(idx)) != null && (closed || !styleArea.closed) && !isNotArea) {
                 p.area = update(p.area, styleArea, scale, mc);
             }
@@ -190,7 +190,7 @@
                     overlayMap.put(idx, styleLinemod);
                 }
             }
-            idx = "b" + key + "=" + OsmUtils.getNamedOsmBoolean(val);
+            idx = 'b' + key + '=' + OsmUtils.getNamedOsmBoolean(val);
             if ((styleArea = areas.get(idx)) != null && (closed || !styleArea.closed) && !isNotArea) {
                 p.area = update(p.area, styleArea, scale, mc);
             }
@@ -205,7 +205,7 @@
                     overlayMap.put(idx, styleLinemod);
                 }
             }
-            idx = "x" + key;
+            idx = 'x' + key;
             if ((styleArea = areas.get(idx)) != null && (closed || !styleArea.closed) && !isNotArea) {
                 p.area = update(p.area, styleArea, scale, mc);
             }
Index: org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSourceHandler.java
===================================================================
--- org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSourceHandler.java	(revision 6082)
+++ org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSourceHandler.java	(working copy)
@@ -51,14 +51,14 @@
 
     Color convertColor(String colString)
     {
-        int i = colString.indexOf("#");
+        int i = colString.indexOf('#');
         Color ret;
         if (i < 0) {
-            ret = Main.pref.getColor("mappaint."+style.getPrefName()+"."+colString, Color.red);
+            ret = Main.pref.getColor("mappaint."+style.getPrefName()+ '.' +colString, Color.red);
         } else if(i == 0) {
             ret = ColorHelper.html2color(colString);
         } else {
-            ret = Main.pref.getColor("mappaint."+style.getPrefName()+"."+colString.substring(0,i),
+            ret = Main.pref.getColor("mappaint."+style.getPrefName()+ '.' +colString.substring(0,i),
                     ColorHelper.html2color(colString.substring(i)));
         }
         return ret;
@@ -73,7 +73,7 @@
     }
 
     private void error(String message) {
-        String warning = style.getDisplayString() + " (" + rule.cond.key + "=" + rule.cond.value + "): " + message;
+        String warning = style.getDisplayString() + " (" + rule.cond.key + '=' + rule.cond.value + "): " + message;
         System.err.println(warning);
         style.logError(new Exception(warning));
     }
Index: org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java
===================================================================
--- org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java	(revision 6082)
+++ org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java	(working copy)
@@ -182,7 +182,7 @@
 
         @Override
         public boolean isValid() {
-            return ! getComponent().getText().trim().equals("");
+            return !getComponent().getText().trim().isEmpty();
         }
 
         @Override
@@ -202,7 +202,7 @@
 
         @Override
         public boolean isValid() {
-            return ! getComponent().getText().trim().equals("");
+            return !getComponent().getText().trim().isEmpty();
         }
 
         @Override
Index: org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java
===================================================================
--- org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java	(revision 6082)
+++ org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java	(working copy)
@@ -205,8 +205,8 @@
         // OSM is an OAuth 1.0 provider and JOSM isn't a web app. We just add the oauth request token to
         // the authorisation request, no callback parameter.
         //
-        sb.append(oauthProviderParameters.getAuthoriseUrl()).append("?")
-        .append(OAuth.OAUTH_TOKEN).append("=").append(requestToken.getKey());
+        sb.append(oauthProviderParameters.getAuthoriseUrl()).append('?')
+        .append(OAuth.OAUTH_TOKEN).append('=').append(requestToken.getKey());
         return sb.toString();
     }
 
@@ -266,9 +266,9 @@
                 Entry<String,String> entry = it.next();
                 String value = entry.getValue();
                 value = (value == null) ? "" : value;
-                sb.append(entry.getKey()).append("=").append(URLEncoder.encode(value, "UTF-8"));
+                sb.append(entry.getKey()).append('=').append(URLEncoder.encode(value, "UTF-8"));
                 if (it.hasNext()) {
-                    sb.append("&");
+                    sb.append('&');
                 }
             }
             return sb.toString();
Index: org/openstreetmap/josm/gui/oauth/TestAccessTokenTask.java
===================================================================
--- org/openstreetmap/josm/gui/oauth/TestAccessTokenTask.java	(revision 6082)
+++ org/openstreetmap/josm/gui/oauth/TestAccessTokenTask.java	(working copy)
@@ -91,7 +91,7 @@
 
         // remove trailing slashes
         while(url.endsWith("/")) {
-            url = url.substring(0, url.lastIndexOf("/"));
+            url = url.substring(0, url.lastIndexOf('/'));
         }
         return url;
     }
Index: org/openstreetmap/josm/gui/preferences/PluginPreference.java
===================================================================
--- org/openstreetmap/josm/gui/preferences/PluginPreference.java	(revision 6082)
+++ org/openstreetmap/josm/gui/preferences/PluginPreference.java	(working copy)
@@ -77,7 +77,7 @@
                     ));
             sb.append("<ul>");
             for(PluginInformation pi: downloaded) {
-                sb.append("<li>").append(pi.name).append(" (").append(pi.version).append(")").append("</li>");
+                sb.append("<li>").append(pi.name).append(" (").append(pi.version).append(')').append("</li>");
             }
             sb.append("</ul>");
         }
@@ -427,7 +427,7 @@
     class SearchFieldAdapter implements DocumentListener {
         public void filter() {
             String expr = tfFilter.getText().trim();
-            if (expr.equals("")) {
+            if (expr.isEmpty()) {
                 expr = null;
             }
             model.filterDisplayedPlugins(expr);
Index: org/openstreetmap/josm/gui/preferences/SourceEditor.java
===================================================================
--- org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 6082)
+++ org/openstreetmap/josm/gui/preferences/SourceEditor.java	(working copy)
@@ -1064,10 +1064,10 @@
                     data,
                     new Comparator<String>() {
                         public int compare(String o1, String o2) {
-                            if (o1.equals("") && o2.equals(""))
+                            if (o1.isEmpty() && o2.isEmpty())
                                 return 0;
-                            if (o1.equals("")) return 1;
-                            if (o2.equals("")) return -1;
+                            if (o1.isEmpty()) return 1;
+                            if (o2.isEmpty()) return -1;
                             return o1.compareTo(o2);
                         }
                     }
@@ -1216,7 +1216,7 @@
                 ExtendedSourceEntry last = null;
 
                 while ((line = reader.readLine()) != null && !canceled) {
-                    if (line.trim().equals("")) {
+                    if (line.trim().isEmpty()) {
                         continue; // skip empty lines
                     }
                     if (line.startsWith("\t")) {
Index: org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java
===================================================================
--- org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java	(revision 6082)
+++ org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java	(working copy)
@@ -348,7 +348,7 @@
                 p.removeAll();
                 for (File f: new File(".").listFiles()) {
                    String s = f.getName();
-                   int idx = s.indexOf("_");
+                   int idx = s.indexOf('_');
                    if (idx>=0) {
                         String t=s.substring(0,idx);
                         System.out.println(t);
@@ -358,7 +358,7 @@
                 }
                 for (File f: Main.pref.getPreferencesDirFile().listFiles()) {
                    String s = f.getName();
-                   int idx = s.indexOf("_");
+                   int idx = s.indexOf('_');
                    if (idx>=0) {
                         String t=s.substring(0,idx);
                         if (profileTypes.containsKey(t))
Index: org/openstreetmap/josm/gui/preferences/advanced/ExportProfileAction.java
===================================================================
--- org/openstreetmap/josm/gui/preferences/advanced/ExportProfileAction.java	(revision 6082)
+++ org/openstreetmap/josm/gui/preferences/advanced/ExportProfileAction.java	(working copy)
@@ -69,8 +69,8 @@
             File sel = fc.getSelectedFile();
             if (!sel.getName().endsWith(".xml")) sel=new File(sel.getAbsolutePath()+".xml");
             if (!sel.getName().startsWith(schemaKey)) {
-                System.out.println(sel.getParentFile().getAbsolutePath()+"/"+schemaKey+"_"+sel.getName());
-                sel =new File(sel.getParentFile().getAbsolutePath()+"/"+schemaKey+"_"+sel.getName());
+                System.out.println(sel.getParentFile().getAbsolutePath()+ '/' +schemaKey+ '_' +sel.getName());
+                sel =new File(sel.getParentFile().getAbsolutePath()+ '/' +schemaKey+ '_' +sel.getName());
             }
             return sel;
         } 
Index: org/openstreetmap/josm/gui/preferences/imagery/AddTMSLayerPanel.java
===================================================================
--- org/openstreetmap/josm/gui/preferences/imagery/AddTMSLayerPanel.java	(revision 6082)
+++ org/openstreetmap/josm/gui/preferences/imagery/AddTMSLayerPanel.java	(working copy)
@@ -67,9 +67,9 @@
         StringBuilder a = new StringBuilder("tms");
         String z = sanitize(tmsZoom.getText());
         if (!z.isEmpty()) {
-            a.append("[").append(z).append("]");
+            a.append('[').append(z).append(']');
         }
-        a.append(":");
+        a.append(':');
         a.append(getImageryRawUrl());
         return a.toString();
     }
Index: org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java
===================================================================
--- org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java	(revision 6082)
+++ org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java	(working copy)
@@ -44,12 +44,12 @@
 
     protected String formatPluginRemoteVersion(PluginInformation pi) {
         StringBuilder sb = new StringBuilder();
-        if (pi.version == null || pi.version.trim().equals("")) {
+        if (pi.version == null || pi.version.trim().isEmpty()) {
             sb.append(tr("unknown"));
         } else {
             sb.append(pi.version);
             if (pi.oldmode) {
-                sb.append("*");
+                sb.append('*');
             }
         }
         return sb.toString();
@@ -57,7 +57,7 @@
 
     protected String formatPluginLocalVersion(PluginInformation pi) {
         if (pi == null) return tr("unknown");
-        if (pi.localversion == null || pi.localversion.trim().equals(""))
+        if (pi.localversion == null || pi.localversion.trim().isEmpty())
             return tr("unknown");
         return pi.localversion;
     }
Index: org/openstreetmap/josm/gui/preferences/projection/CustomProjectionChoice.java
===================================================================
--- org/openstreetmap/josm/gui/preferences/projection/CustomProjectionChoice.java	(revision 6082)
+++ org/openstreetmap/josm/gui/preferences/projection/CustomProjectionChoice.java	(working copy)
@@ -162,25 +162,25 @@
 
         private JComponent build() {
             StringBuilder s = new StringBuilder();
-            s.append("<b>+proj=...</b> - <i>"+tr("Projection name")+"</i><br>");
-            s.append("&nbsp;&nbsp;&nbsp;&nbsp;"+tr("Supported values:")+" ");
-            s.append(listKeys(Projections.projs)+"<br>");
-            s.append("<b>+lat_0=..., +lat_1=..., +lat_2=...</b> - <i>"+tr("Projection parameters")+"</i><br>");
-            s.append("<b>+x_0=..., +y_0=...</b> - <i>"+tr("False easting and false northing")+"</i><br>");
-            s.append("<b>+lon_0=...</b> - <i>"+tr("Central meridian")+"</i><br>");
-            s.append("<b>+k_0=...</b> - <i>"+tr("Scaling factor")+"</i><br>");
-            s.append("<b>+ellps=...</b> - <i>"+tr("Ellipsoid name")+"</i><br>");
-            s.append("&nbsp;&nbsp;&nbsp;&nbsp;"+tr("Supported values:")+" ");
-            s.append(listKeys(Projections.ellipsoids)+"<br>");
-            s.append("<b>+a=..., +b=..., +rf=..., +f=..., +es=...</b> - <i>"+tr("Ellipsoid parameters")+"</i><br>");
-            s.append("<b>+datum=...</b> - <i>"+tr("Datum name")+"</i><br>");
-            s.append("&nbsp;&nbsp;&nbsp;&nbsp;"+tr("Supported values:")+" ");
-            s.append(listKeys(Projections.datums)+"<br>");
-            s.append("<b>+towgs84=...</b> - <i>"+tr("3 or 7 term datum transform parameters")+"</i><br>");
-            s.append("<b>+nadgrids=...</b> - <i>"+tr("NTv2 grid file")+"</i><br>");
-            s.append("&nbsp;&nbsp;&nbsp;&nbsp;"+tr("Built-in:")+" ");
-            s.append(listKeys(Projections.nadgrids)+"<br>");
-            s.append("<b>+bounds=</b>minlon,minlat,maxlon,maxlat - <i>"+tr("Projection bounds (in degrees)")+"</i><br>");
+            s.append("<b>+proj=...</b> - <i>").append(tr("Projection name")).append("</i><br>");
+            s.append("&nbsp;&nbsp;&nbsp;&nbsp;").append(tr("Supported values:")).append(' ');
+            s.append(listKeys(Projections.projs)).append("<br>");
+            s.append("<b>+lat_0=..., +lat_1=..., +lat_2=...</b> - <i>").append(tr("Projection parameters")).append("</i><br>");
+            s.append("<b>+x_0=..., +y_0=...</b> - <i>").append(tr("False easting and false northing")).append("</i><br>");
+            s.append("<b>+lon_0=...</b> - <i>").append(tr("Central meridian")).append("</i><br>");
+            s.append("<b>+k_0=...</b> - <i>").append(tr("Scaling factor")).append("</i><br>");
+            s.append("<b>+ellps=...</b> - <i>").append(tr("Ellipsoid name")).append("</i><br>");
+            s.append("&nbsp;&nbsp;&nbsp;&nbsp;").append(tr("Supported values:")).append(' ');
+            s.append(listKeys(Projections.ellipsoids)).append("<br>");
+            s.append("<b>+a=..., +b=..., +rf=..., +f=..., +es=...</b> - <i>").append(tr("Ellipsoid parameters")).append("</i><br>");
+            s.append("<b>+datum=...</b> - <i>").append(tr("Datum name")).append("</i><br>");
+            s.append("&nbsp;&nbsp;&nbsp;&nbsp;").append(tr("Supported values:")).append(' ');
+            s.append(listKeys(Projections.datums)).append("<br>");
+            s.append("<b>+towgs84=...</b> - <i>").append(tr("3 or 7 term datum transform parameters")).append("</i><br>");
+            s.append("<b>+nadgrids=...</b> - <i>").append(tr("NTv2 grid file")).append("</i><br>");
+            s.append("&nbsp;&nbsp;&nbsp;&nbsp;").append(tr("Built-in:")).append(' ');
+            s.append(listKeys(Projections.nadgrids)).append("<br>");
+            s.append("<b>+bounds=</b>minlon,minlat,maxlon,maxlat - <i>").append(tr("Projection bounds (in degrees)")).append("</i><br>");
 
             HtmlPanel info = new HtmlPanel(s.toString());
             return info;
Index: org/openstreetmap/josm/gui/preferences/projection/UTMProjectionChoice.java
===================================================================
--- org/openstreetmap/josm/gui/preferences/projection/UTMProjectionChoice.java	(revision 6082)
+++ org/openstreetmap/josm/gui/preferences/projection/UTMProjectionChoice.java	(working copy)
@@ -109,7 +109,7 @@
                 projections.add("EPSG:" + (32600 + zone + (hemisphere == Hemisphere.South?100:0)));
             }
         }
-        return projections.toArray(new String[0]);
+        return projections.toArray(new String[projections.size()]);
     }
 
     @Override
@@ -133,7 +133,7 @@
         Hemisphere hemisphere = DEFAULT_HEMISPHERE;
 
         if(args != null) {
-            String[] array = args.toArray(new String[0]);
+            String[] array = args.toArray(new String[args.size()]);
 
             if (array.length > 1) {
                 hemisphere = Hemisphere.valueOf(array[1]);
Index: org/openstreetmap/josm/gui/preferences/server/ApiUrlTestTask.java
===================================================================
--- org/openstreetmap/josm/gui/preferences/server/ApiUrlTestTask.java	(revision 6082)
+++ org/openstreetmap/josm/gui/preferences/server/ApiUrlTestTask.java	(working copy)
@@ -156,7 +156,7 @@
     protected String getNormalizedApiUrl() {
         String apiUrl = url.trim();
         while(apiUrl.endsWith("/")) {
-            apiUrl = apiUrl.substring(0, apiUrl.lastIndexOf("/"));
+            apiUrl = apiUrl.substring(0, apiUrl.lastIndexOf('/'));
         }
         return apiUrl;
     }
@@ -196,7 +196,7 @@
             bin = new BufferedReader(new InputStreamReader(connection.getInputStream()));
             String line;
             while ((line = bin.readLine()) != null) {
-                changesets.append(line).append("\n");
+                changesets.append(line).append('\n');
             }
             if (! (changesets.toString().contains("<osm") && changesets.toString().contains("</osm>"))) {
                 // heuristic: if there isn't an opening and closing "<osm>" tag in the returned content,
Index: org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java
===================================================================
--- org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java	(revision 6082)
+++ org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java	(working copy)
@@ -194,7 +194,7 @@
 
         protected void updateEnabledState() {
             boolean enabled =
-                !tfOsmServerUrl.getText().trim().equals("")
+                    !tfOsmServerUrl.getText().trim().isEmpty()
                 && !tfOsmServerUrl.getText().trim().equals(lastTestedUrl);
             if (enabled) {
                 lblValid.setIcon(null);
@@ -229,7 +229,7 @@
 
         @Override
         public boolean isValid() {
-            if (getComponent().getText().trim().equals(""))
+            if (getComponent().getText().trim().isEmpty())
                 return false;
 
             try {
@@ -242,7 +242,7 @@
 
         @Override
         public void validate() {
-            if (getComponent().getText().trim().equals("")) {
+            if (getComponent().getText().trim().isEmpty()) {
                 feedbackInvalid(tr("OSM API URL must not be empty. Please enter the OSM API URL."));
                 return;
             }
Index: org/openstreetmap/josm/gui/progress/AbstractProgressMonitor.java
===================================================================
--- org/openstreetmap/josm/gui/progress/AbstractProgressMonitor.java	(revision 6082)
+++ org/openstreetmap/josm/gui/progress/AbstractProgressMonitor.java	(working copy)
@@ -159,7 +159,7 @@
     private void resetState() {
         String newTitle;
         if (extraText != null) {
-            newTitle = taskTitle + " " + extraText;
+            newTitle = taskTitle + ' ' + extraText;
         } else {
             newTitle = taskTitle;
         }
Index: org/openstreetmap/josm/gui/progress/ProgressTaskId.java
===================================================================
--- org/openstreetmap/josm/gui/progress/ProgressTaskId.java	(revision 6082)
+++ org/openstreetmap/josm/gui/progress/ProgressTaskId.java	(working copy)
@@ -6,7 +6,7 @@
     private final String id;
 
     public ProgressTaskId(String component, String task) {
-        this.id = component + "." + task;
+        this.id = component + '.' + task;
     }
 
     public String getId() {
Index: org/openstreetmap/josm/gui/tagging/TagEditorModel.java
===================================================================
--- org/openstreetmap/josm/gui/tagging/TagEditorModel.java	(revision 6082)
+++ org/openstreetmap/josm/gui/tagging/TagEditorModel.java	(working copy)
@@ -148,7 +148,7 @@
             break;
         case 1:
             String v = (String)value;
-            if (tag.getValueCount() > 1 && ! v.equals("")) {
+            if (tag.getValueCount() > 1 && !v.isEmpty()) {
                 updateTagValue(tag, v);
             } else if (tag.getValueCount() <= 1) {
                 updateTagValue(tag, v);
@@ -429,7 +429,7 @@
 
             // tag name holds an empty key. Don't apply it to the selection.
             //
-            if (tag.getName().trim().equals("") || tag.getValue().trim().equals("")) {
+            if (tag.getName().trim().isEmpty() || tag.getValue().trim().isEmpty()) {
                 continue;
             }
             tags.put(tag.getName().trim(), tag.getValue().trim());
@@ -475,7 +475,7 @@
 
         // tag name holds an empty key. Don't apply it to the selection.
         //
-        if (tag.getName().trim().equals(""))
+        if (tag.getName().trim().isEmpty())
             return null;
 
         String newkey = tag.getName();
@@ -516,7 +516,7 @@
     public List<String> getKeys() {
         ArrayList<String> keys = new ArrayList<String>();
         for (TagModel tag: tags) {
-            if (!tag.getName().trim().equals("")) {
+            if (!tag.getName().trim().isEmpty()) {
                 keys.add(tag.getName());
             }
         }
Index: org/openstreetmap/josm/gui/tagging/TagModel.java
===================================================================
--- org/openstreetmap/josm/gui/tagging/TagModel.java	(revision 6082)
+++ org/openstreetmap/josm/gui/tagging/TagModel.java	(working copy)
@@ -116,7 +116,7 @@
             for (int i =0; i < values.size(); i++) {
                 sb.append(values.get(i));
                 if (i + 1 < values.size()) {
-                    sb.append(";");
+                    sb.append(';');
                 }
             }
             return sb.toString();
Index: org/openstreetmap/josm/gui/tagging/TaggingPreset.java
===================================================================
--- org/openstreetmap/josm/gui/tagging/TaggingPreset.java	(revision 6082)
+++ org/openstreetmap/josm/gui/tagging/TaggingPreset.java	(working copy)
@@ -117,10 +117,10 @@
     }
 
     public String getName() {
-        return group != null ? group.getName() + "/" + getLocaleName() : getLocaleName();
+        return group != null ? group.getName() + '/' + getLocaleName() : getLocaleName();
     }
     public String getRawName() {
-        return group != null ? group.getRawName() + "/" + name : name;
+        return group != null ? group.getRawName() + '/' + name : name;
     }
 
     /*
Index: org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java
===================================================================
--- org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java	(revision 6082)
+++ org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java	(working copy)
@@ -96,7 +96,7 @@
             if (value.equals(DIFFERENT))
                 return "<b>"+DIFFERENT.replaceAll("<", "&lt;").replaceAll(">", "&gt;")+"</b>";
 
-            if (value.equals(""))
+            if (value.isEmpty())
                 return "&nbsp;";
 
             final StringBuilder res = new StringBuilder("<b>");
@@ -116,7 +116,7 @@
         }
 
         private Integer parseInteger(String str) {
-            if (str == null || "".equals(str))
+            if (str == null || str != null && str.isEmpty())
                 return null;
             try {
                 return Integer.parseInt(str);
@@ -217,7 +217,7 @@
                     }
                 }
             }
-            p.add(new JLabel(locale_text+":"), GBC.std().insets(0,0,10,0));
+            p.add(new JLabel(locale_text+ ':'), GBC.std().insets(0,0,10,0));
             p.add(new JLabel(key), GBC.std().insets(0,0,10,0));
             p.add(new JLabel(cstring), types == null ? GBC.eol() : GBC.std().insets(0,0,10,0));
             if(types != null){
@@ -436,7 +436,7 @@
         public String toString() {
             return "KeyedItem [key=" + key + ", text=" + text
                     + ", text_context=" + text_context + ", match=" + match
-                    + "]";
+                    + ']';
         }
     }
 
@@ -468,7 +468,7 @@
         public String toString() {
             return "Key [key=" + key + ", value=" + value + ", text=" + text
                     + ", text_context=" + text_context + ", match=" + match
-                    + "]";
+                    + ']';
         }
     }
     
@@ -589,7 +589,7 @@
                 pnl.add(releasebutton, GBC.eol());
                 value = pnl;
             }
-            p.add(new JLabel(locale_text+":"), GBC.std().insets(0,0,10,0));
+            p.add(new JLabel(locale_text+ ':'), GBC.std().insets(0,0,10,0));
             p.add(value, GBC.eol().fill(GBC.HORIZONTAL));
             return true;
         }
Index: org/openstreetmap/josm/gui/tagging/ac/AutoCompletingTextField.java
===================================================================
--- org/openstreetmap/josm/gui/tagging/ac/AutoCompletingTextField.java	(revision 6082)
+++ org/openstreetmap/josm/gui/tagging/ac/AutoCompletingTextField.java	(working copy)
@@ -149,7 +149,7 @@
 
                     @Override
                     public void keyReleased(KeyEvent e) {
-                        if (getText().equals("")) {
+                        if (getText().isEmpty()) {
                             applyFilter("");
                         }
                     }
Index: org/openstreetmap/josm/gui/tagging/ac/AutoCompletionListItem.java
===================================================================
--- org/openstreetmap/josm/gui/tagging/ac/AutoCompletionListItem.java	(revision 6082)
+++ org/openstreetmap/josm/gui/tagging/ac/AutoCompletionListItem.java	(working copy)
@@ -81,7 +81,7 @@
         sb.append(value);
         sb.append("',");
         sb.append(priority.toString());
-        sb.append(">");
+        sb.append('>');
         return sb.toString();
     }
 
Index: org/openstreetmap/josm/gui/widgets/HtmlPanel.java
===================================================================
--- org/openstreetmap/josm/gui/widgets/HtmlPanel.java	(revision 6082)
+++ org/openstreetmap/josm/gui/widgets/HtmlPanel.java	(working copy)
@@ -36,7 +36,7 @@
                 f.isBold() ? "bold" : "normal",
                         f.isItalic() ? "italic" : "normal"
         );
-        rule = "body {" + rule + "}";
+        rule = "body {" + rule + '}';
         rule = MessageFormat.format(
                 "font-family: ''{0}'';font-size: {1,number}pt; font-weight: {2}; font-style: {3}",
                 f.getName(),
@@ -44,7 +44,7 @@
                 "bold",
                 f.isItalic() ? "italic" : "normal"
         );
-        rule = "strong {" + rule + "}";
+        rule = "strong {" + rule + '}';
         ss.addRule(rule);
         ss.addRule("a {text-decoration: underline; color: blue}");
         ss.addRule("ul {margin-left: 1cm; list-style-type: disc}");
Index: org/openstreetmap/josm/io/AllFormatsImporter.java
===================================================================
--- org/openstreetmap/josm/io/AllFormatsImporter.java	(revision 6082)
+++ org/openstreetmap/josm/io/AllFormatsImporter.java	(working copy)
@@ -34,7 +34,7 @@
                 continue;
             }
             ext.append(fi.filter.getExtensions());
-            ext.append(",");
+            ext.append(',');
         }
         // remove last comma
         return ext.substring(0, ext.length()-1).toString();
Index: org/openstreetmap/josm/io/BoundingBoxDownloader.java
===================================================================
--- org/openstreetmap/josm/io/BoundingBoxDownloader.java	(revision 6082)
+++ org/openstreetmap/josm/io/BoundingBoxDownloader.java	(working copy)
@@ -72,12 +72,12 @@
             progressMonitor.indeterminateSubTask(tr("Contacting OSM Server..."));
             if (crosses180th) {
                 // API 0.6 does not support requests crossing the 180th meridian, so make two requests
-                GpxData result = downloadRawGps("trackpoints?bbox="+lon1+","+lat1+",180.0,"+lat2+"&page=", progressMonitor);
-                result.mergeFrom(downloadRawGps("trackpoints?bbox=-180.0,"+lat1+","+lon2+","+lat2+"&page=", progressMonitor));
+                GpxData result = downloadRawGps("trackpoints?bbox="+lon1+ ',' +lat1+",180.0,"+lat2+"&page=", progressMonitor);
+                result.mergeFrom(downloadRawGps("trackpoints?bbox=-180.0,"+lat1+ ',' +lon2+ ',' +lat2+"&page=", progressMonitor));
                 return result;
             } else {
                 // Simple request
-                return downloadRawGps("trackpoints?bbox="+lon1+","+lat1+","+lon2+","+lat2+"&page=", progressMonitor);
+                return downloadRawGps("trackpoints?bbox="+lon1+ ',' +lat1+ ',' +lon2+ ',' +lat2+"&page=", progressMonitor);
             }
         } catch (IllegalArgumentException e) {
             // caused by HttpUrlConnection in case of illegal stuff in the response
@@ -102,7 +102,7 @@
     }
 
     protected String getRequestForBbox(double lon1, double lat1, double lon2, double lat2) {
-        return "map?bbox=" + lon1 + "," + lat1 + "," + lon2 + "," + lat2;
+        return "map?bbox=" + lon1 + ',' + lat1 + ',' + lon2 + ',' + lat2;
     }
 
     /**
Index: org/openstreetmap/josm/io/CacheFiles.java
===================================================================
--- org/openstreetmap/josm/io/CacheFiles.java	(revision 6082)
+++ org/openstreetmap/josm/io/CacheFiles.java	(working copy)
@@ -70,7 +70,7 @@
 
         boolean dir_writeable;
         this.ident = ident;
-        String cacheDir = Main.pref.get("cache." + ident + "." + "path", pref + File.separator + ident + File.separator);
+        String cacheDir = Main.pref.get("cache." + ident + '.' + "path", pref + File.separator + ident + File.separator);
         this.dir = new File(cacheDir);
         try {
             this.dir.mkdirs();
@@ -80,11 +80,11 @@
             dir_writeable = false;
         }
         this.enabled = dir_writeable;
-        this.expire = Main.pref.getLong("cache." + ident + "." + "expire", EXPIRE_DAILY);
+        this.expire = Main.pref.getLong("cache." + ident + '.' + "expire", EXPIRE_DAILY);
         if(this.expire < 0) {
             this.expire = CacheFiles.EXPIRE_NEVER;
         }
-        this.maxsize = Main.pref.getLong("cache." + ident + "." + "maxsize", 50);
+        this.maxsize = Main.pref.getLong("cache." + ident + '.' + "maxsize", 50);
         if(this.maxsize < 0) {
             this.maxsize = -1;
         }
@@ -193,7 +193,7 @@
      * @param force will also write it to the preferences
      */
     public void setExpire(int amount, boolean force) {
-        String key = "cache." + ident + "." + "expire";
+        String key = "cache." + ident + '.' + "expire";
         if(!Main.pref.get(key).isEmpty() && !force)
             return;
 
@@ -207,7 +207,7 @@
      * @param force will also write it to the preferences
      */
     public void setMaxSize(int amount, boolean force) {
-        String key = "cache." + ident + "." + "maxsize";
+        String key = "cache." + ident + '.' + "maxsize";
         if(!Main.pref.get(key).isEmpty() && !force)
             return;
 
@@ -333,7 +333,7 @@
      * @return file structure
      */
     private File getPath(String ident, String ending) {
-        return new File(dir, getUniqueFilename(ident) + "." + ending);
+        return new File(dir, getUniqueFilename(ident) + '.' + ending);
     }
 
     /**
Index: org/openstreetmap/josm/io/ChangesetQuery.java
===================================================================
--- org/openstreetmap/josm/io/ChangesetQuery.java	(revision 6082)
+++ org/openstreetmap/josm/io/ChangesetQuery.java	(working copy)
@@ -232,43 +232,43 @@
     public String getQueryString() {
         StringBuffer sb = new StringBuffer();
         if (uid != null) {
-            sb.append("user").append("=").append(uid);
+            sb.append("user").append('=').append(uid);
         } else if (userName != null) {
             try {
-                sb.append("display_name").append("=").append(URLEncoder.encode(userName, "UTF-8"));
+                sb.append("display_name").append('=').append(URLEncoder.encode(userName, "UTF-8"));
             } catch (UnsupportedEncodingException e) {
                 e.printStackTrace();
             }
         }
         if (bounds != null) {
             if (sb.length() > 0) {
-                sb.append("&");
+                sb.append('&');
             }
             sb.append("bbox=").append(bounds.encodeAsString(","));
         }
         if (closedAfter != null && createdBefore != null) {
             if (sb.length() > 0) {
-                sb.append("&");
+                sb.append('&');
             }
             SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssz");
-            sb.append("time").append("=").append(df.format(closedAfter));
-            sb.append(",").append(df.format(createdBefore));
+            sb.append("time").append('=').append(df.format(closedAfter));
+            sb.append(',').append(df.format(createdBefore));
         } else if (closedAfter != null) {
             if (sb.length() > 0) {
-                sb.append("&");
+                sb.append('&');
             }
             SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssz");
-            sb.append("time").append("=").append(df.format(closedAfter));
+            sb.append("time").append('=').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));
         }
@@ -301,7 +301,7 @@
 
     public static class ChangesetQueryUrlParser {
         protected int parseUid(String value) throws ChangesetQueryUrlException {
-            if (value == null || value.trim().equals(""))
+            if (value == null || value.trim().isEmpty())
                 throw new ChangesetQueryUrlException(tr("Unexpected value for ''{0}'' in changeset query url, got {1}", "uid",value));
             int id;
             try {
@@ -315,7 +315,7 @@
         }
 
         protected boolean parseOpen(String value) throws ChangesetQueryUrlException {
-            if (value == null || value.trim().equals(""))
+            if (value == null || value.trim().isEmpty())
                 throw new ChangesetQueryUrlException(tr("Unexpected value for ''{0}'' in changeset query url, got {1}", "open",value));
             if (value.equals("true"))
                 return true;
@@ -326,7 +326,7 @@
         }
 
         protected boolean parseBoolean(String value, String parameter) throws ChangesetQueryUrlException {
-            if (value == null || value.trim().equals(""))
+            if (value == null || value.trim().isEmpty())
                 throw new ChangesetQueryUrlException(tr("Unexpected value for ''{0}'' in changeset query url, got {1}", parameter,value));
             if (value.equals("true"))
                 return true;
@@ -337,7 +337,7 @@
         }
 
         protected Date parseDate(String value, String parameter) throws ChangesetQueryUrlException {
-            if (value == null || value.trim().equals(""))
+            if (value == null || value.trim().isEmpty())
                 throw new ChangesetQueryUrlException(tr("Unexpected value for ''{0}'' in changeset query url, got {1}", parameter,value));
             if (value.endsWith("Z")) {
                 // OSM API generates date strings we time zone abbreviation "Z" which Java SimpleDateFormat
@@ -435,7 +435,7 @@
             if (query == null)
                 return new ChangesetQuery();
             query = query.trim();
-            if (query.equals(""))
+            if (query.isEmpty())
                 return new ChangesetQuery();
             Map<String,String> queryParams  = createMapFromQueryString(query);
             return crateFromMap(queryParams);
Index: org/openstreetmap/josm/io/DefaultProxySelector.java
===================================================================
--- org/openstreetmap/josm/io/DefaultProxySelector.java	(revision 6082)
+++ org/openstreetmap/josm/io/DefaultProxySelector.java	(working copy)
@@ -107,7 +107,7 @@
         }
         String host = Main.pref.get(ProxyPreferencesPanel.PROXY_HTTP_HOST, null);
         int port = parseProxyPortValue(ProxyPreferencesPanel.PROXY_HTTP_PORT, Main.pref.get(ProxyPreferencesPanel.PROXY_HTTP_PORT, null));
-        if (host != null && ! host.trim().equals("") && port > 0) {
+        if (host != null && !host.trim().isEmpty() && port > 0) {
             httpProxySocketAddress = new InetSocketAddress(host,port);
         } else {
             httpProxySocketAddress = null;
@@ -119,7 +119,7 @@
 
         host = Main.pref.get(ProxyPreferencesPanel.PROXY_SOCKS_HOST, null);
         port = parseProxyPortValue(ProxyPreferencesPanel.PROXY_SOCKS_PORT, Main.pref.get(ProxyPreferencesPanel.PROXY_SOCKS_PORT, null));
-        if (host != null && ! host.trim().equals("") && port > 0) {
+        if (host != null && !host.trim().isEmpty() && port > 0) {
             socksProxySocketAddress = new InetSocketAddress(host,port);
         } else {
             socksProxySocketAddress = null;
Index: org/openstreetmap/josm/io/GeoJSONWriter.java
===================================================================
--- org/openstreetmap/josm/io/GeoJSONWriter.java	(revision 6082)
+++ org/openstreetmap/josm/io/GeoJSONWriter.java	(working copy)
@@ -54,7 +54,7 @@
             insertCommaCoords = true;
             appendCoord(n.getCoor());
         }
-        out.append("]");
+        out.append(']');
     }
 
     @Override
@@ -90,7 +90,7 @@
                 }
                 insertCommaTags = true;
                 out.append("\t\t\"").append(escape(t.getKey())).append("\": ");
-                out.append("\"").append(escape(t.getValue())).append("\"");
+                out.append('"').append(escape(t.getValue())).append('"');
             }
             out.append("\n\t},\n");
         } else {
@@ -99,14 +99,14 @@
         { // append primitive specific
             out.append("\t\"geometry\": {");
             p.accept(this);
-            out.append("}");
+            out.append('}');
         }
-        out.append("}");
+        out.append('}');
     }
 
     protected void appendCoord(LatLon c) {
         if (c != null) {
-            out.append("[").append(c.lon()).append(", ").append(c.lat()).append("]");
+            out.append('[').append(c.lon()).append(", ").append(c.lat()).append(']');
         }
     }
 }
Index: org/openstreetmap/josm/io/GpxReader.java
===================================================================
--- org/openstreetmap/josm/io/GpxReader.java	(revision 6082)
+++ org/openstreetmap/josm/io/GpxReader.java	(working copy)
@@ -154,7 +154,7 @@
                     currentState = State.link;
                     currentLink = new GpxLink(atts.getValue("href"));
                 } else if (localName.equals("email")) {
-                    data.attr.put(META_AUTHOR_EMAIL, atts.getValue("id") + "@" + atts.getValue("domain"));
+                    data.attr.put(META_AUTHOR_EMAIL, atts.getValue("id") + '@' + atts.getValue("domain"));
                 }
                 break;
             case trk:
Index: org/openstreetmap/josm/io/GpxWriter.java
===================================================================
--- org/openstreetmap/josm/io/GpxWriter.java	(revision 6082)
+++ org/openstreetmap/josm/io/GpxWriter.java	(working copy)
@@ -121,7 +121,7 @@
             if (attr.containsKey(META_AUTHOR_EMAIL)) {
                 String[] tmp = ((String)attr.get(META_AUTHOR_EMAIL)).split("@");
                 if (tmp.length == 2) {
-                    inline("email", "id=\"" + tmp[0] + "\" domain=\""+tmp[1]+"\"");
+                    inline("email", "id=\"" + tmp[0] + "\" domain=\""+tmp[1]+ '"');
                 }
             }
             // write the author link
@@ -132,7 +132,7 @@
         // write the copyright details
         if (attr.containsKey(META_COPYRIGHT_LICENSE)
                 || attr.containsKey(META_COPYRIGHT_YEAR)) {
-            openAtt("copyright", "author=\""+ attr.get(META_COPYRIGHT_AUTHOR) +"\"");
+            openAtt("copyright", "author=\""+ attr.get(META_COPYRIGHT_AUTHOR) + '"');
             if (attr.containsKey(META_COPYRIGHT_YEAR)) {
                 simpleTag("year", (String) attr.get(META_COPYRIGHT_YEAR));
             }
@@ -157,7 +157,7 @@
         Bounds bounds = data.recalculateBounds();
         if (bounds != null) {
             String b = "minlat=\"" + bounds.getMin().lat() + "\" minlon=\"" + bounds.getMin().lon() +
-            "\" maxlat=\"" + bounds.getMax().lat() + "\" maxlon=\"" + bounds.getMax().lon() + "\"" ;
+            "\" maxlat=\"" + bounds.getMax().lat() + "\" maxlon=\"" + bounds.getMax().lon() + '"';
             inline("bounds", b);
         }
 
@@ -208,22 +208,22 @@
     }
 
     private void open(String tag) {
-        out.print(indent + "<" + tag + ">");
+        out.print(indent + '<' + tag + '>');
         indent += "  ";
     }
 
     private void openAtt(String tag, String attributes) {
-        out.println(indent + "<" + tag + " " + attributes + ">");
+        out.println(indent + '<' + tag + ' ' + attributes + '>');
         indent += "  ";
     }
 
     private void inline(String tag, String attributes) {
-        out.println(indent + "<" + tag + " " + attributes + "/>");
+        out.println(indent + '<' + tag + ' ' + attributes + "/>");
     }
 
     private void close(String tag) {
         indent = indent.substring(2);
-        out.print(indent + "</" + tag + ">");
+        out.print(indent + "</" + tag + '>');
     }
 
     private void closeln(String tag) {
@@ -239,7 +239,7 @@
         if (content != null && content.length() > 0) {
             open(tag);
             out.print(encode(content));
-            out.println("</" + tag + ">");
+            out.println("</" + tag + '>');
             indent = indent.substring(2);
         }
     }
@@ -249,7 +249,7 @@
      */
     private void gpxLink(GpxLink link) {
         if (link != null) {
-            openAtt("link", "href=\"" + link.uri + "\"");
+            openAtt("link", "href=\"" + link.uri + '"');
             simpleTag("text", link.text);
             simpleTag("type", link.type);
             closeln("link");
@@ -276,7 +276,7 @@
         }
         if (pnt != null) {
             LatLon c = pnt.getCoor();
-            String coordAttr = "lat=\"" + c.lat() + "\" lon=\"" + c.lon() + "\"";
+            String coordAttr = "lat=\"" + c.lat() + "\" lon=\"" + c.lon() + '"';
             if (pnt.attr.isEmpty()) {
                 inline(type, coordAttr);
             } else {
Index: org/openstreetmap/josm/io/JpgImporter.java
===================================================================
--- org/openstreetmap/josm/io/JpgImporter.java	(revision 6082)
+++ org/openstreetmap/josm/io/JpgImporter.java	(working copy)
@@ -34,7 +34,7 @@
      * @since 5438
      */
     public static final ExtensionFileFilter FILE_FILTER_WITH_FOLDERS = new ExtensionFileFilter(
-            "jpg", "jpg", tr("Image Files") + " (*.jpg, "+ tr("folder")+")");
+            "jpg", "jpg", tr("Image Files") + " (*.jpg, "+ tr("folder")+ ')');
 
     /**
      * Constructs a new {@code JpgImporter}.
Index: org/openstreetmap/josm/io/MirroredInputStream.java
===================================================================
--- org/openstreetmap/josm/io/MirroredInputStream.java	(revision 6082)
+++ org/openstreetmap/josm/io/MirroredInputStream.java	(working copy)
@@ -110,7 +110,7 @@
             Enumeration<? extends ZipEntry> entries = zipFile.entries();
             while (entries.hasMoreElements()) {
                 ZipEntry entry = entries.nextElement();
-                if (entry.getName().endsWith("." + extension)) {
+                if (entry.getName().endsWith('.' + extension)) {
                     /* choose any file with correct extension. When more than
                         one file, prefer the one which matches namepart */
                     if (resentry == null || entry.getName().indexOf(namepart) >= 0) {
@@ -170,7 +170,7 @@
         StringBuilder prefKey = new StringBuilder("mirror.");
         if (destDir != null) {
             prefKey.append(destDir);
-            prefKey.append(".");
+            prefKey.append('.');
         }
         prefKey.append(url.toString());
         return prefKey.toString().replaceAll("=","_");
Index: org/openstreetmap/josm/io/MultiFetchServerObjectReader.java
===================================================================
--- org/openstreetmap/josm/io/MultiFetchServerObjectReader.java	(revision 6082)
+++ org/openstreetmap/josm/io/MultiFetchServerObjectReader.java	(working copy)
@@ -270,7 +270,7 @@
         for (int i=0; i<idPackage.size(); i++) {
             sb.append(it.next());
             if (i < idPackage.size()-1) {
-                sb.append(",");
+                sb.append(',');
             }
         }
         return sb.toString();
@@ -345,7 +345,7 @@
         }
         // Run the fetchers
         for (int i = 0; i < jobs.size() && !isCanceled(); i++) {
-            progressMonitor.subTask(msg + "... " + progressMonitor.getTicks() + "/" + progressMonitor.getTicksCount());
+            progressMonitor.subTask(msg + "... " + progressMonitor.getTicks() + '/' + progressMonitor.getTicksCount());
             try {
                 FetchResult result = ecs.take().get();
                 if (result.missingPrimitives != null) {
Index: org/openstreetmap/josm/io/NMEAImporter.java
===================================================================
--- org/openstreetmap/josm/io/NMEAImporter.java	(revision 6082)
+++ org/openstreetmap/josm/io/NMEAImporter.java	(working copy)
@@ -51,11 +51,11 @@
 
     private void showNmeaInfobox(boolean success, NmeaReader r) {
         final StringBuilder msg = new StringBuilder().append("<html>");
-        msg.append(tr("Coordinates imported: {0}", r.getNumberOfCoordinates()) + "<br>");
-        msg.append(tr("Malformed sentences: {0}", r.getParserMalformed()) + "<br>");
-        msg.append(tr("Checksum errors: {0}", r.getParserChecksumErrors()) + "<br>");
+        msg.append(tr("Coordinates imported: {0}", r.getNumberOfCoordinates())).append("<br>");
+        msg.append(tr("Malformed sentences: {0}", r.getParserMalformed())).append("<br>");
+        msg.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()));
         msg.append("</html>");
Index: org/openstreetmap/josm/io/NmeaReader.java
===================================================================
--- org/openstreetmap/josm/io/NmeaReader.java	(revision 6082)
+++ org/openstreetmap/josm/io/NmeaReader.java	(working copy)
@@ -234,7 +234,7 @@
     // Returns true if the input made sence, false otherwise.
     private boolean ParseNMEASentence(String s, NMEAParserState ps) {
         try {
-            if (s.equals(""))
+            if (s.isEmpty())
                 throw new NullPointerException();
 
             // checksum check:
@@ -303,11 +303,11 @@
                 if(accu.equals("M")) {
                     // Ignore heights that are not in meters for now
                     accu=e[GPGGA.HEIGHT.position];
-                    if(!accu.equals("")) {
+                    if(!accu.isEmpty()) {
                         Double.parseDouble(accu);
                         // if it throws it's malformed; this should only happen if the
                         // device sends nonstandard data.
-                        if(!accu.equals("")) {
+                        if(!accu.isEmpty()) {
                             currentwp.attr.put("ele", accu);
                         }
                     }
@@ -315,18 +315,18 @@
                 // number of sattelites
                 accu=e[GPGGA.SATELLITE_COUNT.position];
                 int sat = 0;
-                if(!accu.equals("")) {
+                if(!accu.isEmpty()) {
                     sat = Integer.parseInt(accu);
                     currentwp.attr.put("sat", accu);
                 }
                 // h-dilution
                 accu=e[GPGGA.HDOP.position];
-                if(!accu.equals("")) {
+                if(!accu.isEmpty()) {
                     currentwp.attr.put("hdop", Float.parseFloat(accu));
                 }
                 // fix
                 accu=e[GPGGA.QUALITY.position];
-                if(!accu.equals("")) {
+                if(!accu.isEmpty()) {
                     int fixtype = Integer.parseInt(accu);
                     switch(fixtype) {
                     case 0:
@@ -352,7 +352,7 @@
                 if(accu.equals("T")) {
                     // other values than (T)rue are ignored
                     accu = e[GPVTG.COURSE.position];
-                    if(!accu.equals("")) {
+                    if(!accu.isEmpty()) {
                         Double.parseDouble(accu);
                         currentwp.attr.put("course", accu);
                     }
@@ -361,7 +361,7 @@
                 accu = e[GPVTG.SPEED_KMH_UNIT.position];
                 if(accu.startsWith("K")) {
                     accu = e[GPVTG.SPEED_KMH.position];
-                    if(!accu.equals("")) {
+                    if(!accu.isEmpty()) {
                         double speed = Double.parseDouble(accu);
                         speed /= 3.6; // speed in m/s
                         currentwp.attr.put("speed", Double.toString(speed));
@@ -370,17 +370,17 @@
             } else if(e[0].equals("$GPGSA") || e[0].equals("$GNGSA")) {
                 // vdop
                 accu=e[GPGSA.VDOP.position];
-                if(!accu.equals("")) {
+                if(!accu.isEmpty()) {
                     currentwp.attr.put("vdop", Float.parseFloat(accu));
                 }
                 // hdop
                 accu=e[GPGSA.HDOP.position];
-                if(!accu.equals("")) {
+                if(!accu.isEmpty()) {
                     currentwp.attr.put("hdop", Float.parseFloat(accu));
                 }
                 // pdop
                 accu=e[GPGSA.PDOP.position];
-                if(!accu.equals("")) {
+                if(!accu.isEmpty()) {
                     currentwp.attr.put("pdop", Float.parseFloat(accu));
                 }
             }
@@ -411,14 +411,14 @@
                 currentwp.attr.put("time", DateUtils.fromDate(d));
                 // speed
                 accu = e[GPRMC.SPEED.position];
-                if(!accu.equals("") && !currentwp.attr.containsKey("speed")) {
+                if(!accu.isEmpty() && !currentwp.attr.containsKey("speed")) {
                     double speed = Double.parseDouble(accu);
                     speed *= 0.514444444; // to m/s
                     currentwp.attr.put("speed", Double.toString(speed));
                 }
                 // course
                 accu = e[GPRMC.COURSE.position];
-                if(!accu.equals("") && !currentwp.attr.containsKey("course")) {
+                if(!accu.isEmpty() && !currentwp.attr.containsKey("course")) {
                     Double.parseDouble(accu);
                     currentwp.attr.put("course", accu);
                 }
@@ -463,7 +463,7 @@
 
         // return a zero latlon instead of null so it is logged as zero coordinate
         // instead of malformed sentence
-        if(widthNorth.equals("")&&lengthEast.equals("")) return new LatLon(0.0,0.0);
+        if(widthNorth.isEmpty() && lengthEast.isEmpty()) return new LatLon(0.0,0.0);
 
         // The format is xxDDLL.LLLL
         // xx optional whitespace
Index: org/openstreetmap/josm/io/OsmApi.java
===================================================================
--- org/openstreetmap/josm/io/OsmApi.java	(revision 6082)
+++ org/openstreetmap/josm/io/OsmApi.java	(working copy)
@@ -316,10 +316,10 @@
     public String getBaseUrl() {
         StringBuffer rv = new StringBuffer(serverUrl);
         if (version != null) {
-            rv.append("/");
+            rv.append('/');
             rv.append(version);
         }
-        rv.append("/");
+        rv.append('/');
         // this works around a ruby (or lighttpd) bug where two consecutive slashes in
         // an URL will cause a "404 not found" response.
         int p; while ((p = rv.indexOf("//", 6)) > -1) { rv.delete(p, p + 1); }
@@ -360,7 +360,7 @@
             ensureValidChangeset();
             initialize(monitor);
             // normal mode (0.6 and up) returns new object version.
-            ret = sendRequest("PUT", OsmPrimitiveType.from(osm).getAPIName()+"/" + osm.getId(), toXml(osm, true), monitor);
+            ret = sendRequest("PUT", OsmPrimitiveType.from(osm).getAPIName()+ '/' + osm.getId(), toXml(osm, true), monitor);
             osm.setOsmId(osm.getId(), Integer.parseInt(ret.trim()));
             osm.setChangesetId(getChangeset().getId());
             osm.setVisible(true);
@@ -480,7 +480,7 @@
             initialize(monitor);
             /* send "\r\n" instead of empty string, so we don't send zero payload - works around bugs
                in proxy software */
-            sendRequest("PUT", "changeset" + "/" + changeset.getId() + "/close", "\r\n", monitor);
+            sendRequest("PUT", "changeset" + '/' + changeset.getId() + "/close", "\r\n", monitor);
             changeset.setOpen(false);
         } finally {
             monitor.finishTask();
@@ -595,7 +595,7 @@
         while(true) { // the retry loop
             try {
                 URL url = new URL(new URL(getBaseUrl()), urlSuffix);
-                System.out.print(requestMethod + " " + url + "... ");
+                System.out.print(requestMethod + ' ' + url + "... ");
                 // fix #5369, see http://www.tikalk.com/java/forums/httpurlconnection-disable-keep-alive
                 activeConnection = Utils.openHttpConnection(url, false);
                 activeConnection.setConnectTimeout(fastFail ? 1000 : Main.pref.getInteger("socket.timeout.connect",15)*1000);
@@ -658,7 +658,7 @@
                     String s;
                     while((s = in.readLine()) != null) {
                         responseBody.append(s);
-                        responseBody.append("\n");
+                        responseBody.append('\n');
                     }
                 }
                 String errorHeader = null;
Index: org/openstreetmap/josm/io/OsmApiException.java
===================================================================
--- org/openstreetmap/josm/io/OsmApiException.java	(revision 6082)
+++ org/openstreetmap/josm/io/OsmApiException.java	(working copy)
@@ -138,7 +138,7 @@
             if (!eh.isEmpty()) {
                 sb.append(", Error Header=<")
                 .append(eh)
-                .append(">");
+                .append('>');
             }
         }
         catch (Exception e) {
@@ -150,7 +150,7 @@
             if (!eb.isEmpty() && !eb.equals(eh)) {
                 sb.append(", Error Body=<")
                 .append(eb)
-                .append(">");
+                .append('>');
             }
         }
         catch (Exception e) {
@@ -169,7 +169,7 @@
         if (errorHeader != null) {
             sb.append(tr(errorHeader));
             sb.append(tr("(Code={0})", responseCode));
-        } else if (errorBody != null && !errorBody.trim().equals("")) {
+        } else if (errorBody != null && !errorBody.trim().isEmpty()) {
             errorBody = errorBody.trim();
             sb.append(tr(errorBody));
             sb.append(tr("(Code={0})", responseCode));
Index: org/openstreetmap/josm/io/OsmConnection.java
===================================================================
--- org/openstreetmap/josm/io/OsmConnection.java	(revision 6082)
+++ org/openstreetmap/josm/io/OsmConnection.java	(working copy)
@@ -90,7 +90,7 @@
         } else {
             String username= response.getUsername() == null ? "" : response.getUsername();
             String password = response.getPassword() == null ? "" : String.valueOf(response.getPassword());
-            token = username + ":" + password;
+            token = username + ':' + password;
             try {
                 ByteBuffer bytes = encoder.encode(CharBuffer.wrap(token));
                 con.addRequestProperty("Authorization", "Basic "+Base64.encode(bytes));
Index: org/openstreetmap/josm/io/OsmDataParsingException.java
===================================================================
--- org/openstreetmap/josm/io/OsmDataParsingException.java	(revision 6082)
+++ org/openstreetmap/josm/io/OsmDataParsingException.java	(working copy)
@@ -41,7 +41,7 @@
         if (msg == null) {
             msg = getClass().getName();
         }
-        msg = msg + " " + tr("(at line {0}, column {1})", lineNumber, columnNumber);
+        msg = msg + ' ' + tr("(at line {0}, column {1})", lineNumber, columnNumber);
         return msg;
     }
 
Index: org/openstreetmap/josm/io/OsmExporter.java
===================================================================
--- org/openstreetmap/josm/io/OsmExporter.java	(revision 6082)
+++ org/openstreetmap/josm/io/OsmExporter.java	(working copy)
@@ -62,7 +62,7 @@
             // process of writing the file, we might just end up with
             // a truncated file.  That can destroy lots of work.
             if (file.exists()) {
-                tmpFile = new File(file.getPath() + "~");
+                tmpFile = new File(file.getPath() + '~');
                 Utils.copyFile(file, tmpFile);
             }
 
Index: org/openstreetmap/josm/io/OsmHistoryReader.java
===================================================================
--- org/openstreetmap/josm/io/OsmHistoryReader.java	(revision 6082)
+++ org/openstreetmap/josm/io/OsmHistoryReader.java	(working copy)
@@ -56,7 +56,7 @@
         protected String getCurrentPosition() {
             if (locator == null)
                 return "";
-            return "(" + locator.getLineNumber() + "," + locator.getColumnNumber() + ")";
+            return "(" + locator.getLineNumber() + ',' + locator.getColumnNumber() + ')';
         }
 
         protected void throwException(String message) throws SAXException {
Index: org/openstreetmap/josm/io/OsmReader.java
===================================================================
--- org/openstreetmap/josm/io/OsmReader.java	(revision 6082)
+++ org/openstreetmap/josm/io/OsmReader.java	(working copy)
@@ -563,7 +563,7 @@
             }
             if (getLocation() == null)
                 return msg;
-            msg = msg + " " + tr("(at line {0}, column {1})", getLocation().getLineNumber(), getLocation().getColumnNumber());
+            msg = msg + ' ' + tr("(at line {0}, column {1})", getLocation().getLineNumber(), getLocation().getColumnNumber());
             return msg;
         }
     }
Index: org/openstreetmap/josm/io/OsmServerBackreferenceReader.java
===================================================================
--- org/openstreetmap/josm/io/OsmServerBackreferenceReader.java	(revision 6082)
+++ org/openstreetmap/josm/io/OsmServerBackreferenceReader.java	(working copy)
@@ -136,7 +136,7 @@
             progressMonitor.indeterminateSubTask(tr("Downloading from OSM Server..."));
             StringBuffer sb = new StringBuffer();
             sb.append(primitiveType.getAPIName())
-            .append("/").append(id).append("/ways");
+            .append('/').append(id).append("/ways");
 
             in = getInputStream(sb.toString(), progressMonitor.createSubTaskMonitor(1, true));
             if (in == null)
@@ -170,7 +170,7 @@
             progressMonitor.subTask(tr("Contacting OSM Server..."));
             StringBuffer sb = new StringBuffer();
             sb.append(primitiveType.getAPIName())
-            .append("/").append(id).append("/relations");
+            .append('/').append(id).append("/relations");
 
             in = getInputStream(sb.toString(), progressMonitor.createSubTaskMonitor(1, true));
             if (in == null)
Index: org/openstreetmap/josm/io/OsmServerHistoryReader.java
===================================================================
--- org/openstreetmap/josm/io/OsmServerHistoryReader.java	(revision 6082)
+++ org/openstreetmap/josm/io/OsmServerHistoryReader.java	(working copy)
@@ -61,7 +61,7 @@
             progressMonitor.indeterminateSubTask(tr("Contacting OSM Server..."));
             StringBuffer sb = new StringBuffer();
             sb.append(primitiveType.getAPIName())
-            .append("/").append(id).append("/history");
+            .append('/').append(id).append("/history");
 
             in = getInputStream(sb.toString(), progressMonitor.createSubTaskMonitor(1, true));
             if (in == null)
Index: org/openstreetmap/josm/io/OsmServerObjectReader.java
===================================================================
--- org/openstreetmap/josm/io/OsmServerObjectReader.java	(revision 6082)
+++ org/openstreetmap/josm/io/OsmServerObjectReader.java	(working copy)
@@ -123,12 +123,12 @@
             progressMonitor.indeterminateSubTask(tr("Downloading OSM data..."));
             StringBuffer sb = new StringBuffer();
             sb.append(id.getType().getAPIName());
-            sb.append("/");
+            sb.append('/');
             sb.append(id.getUniqueId());
             if (full && ! id.getType().equals(OsmPrimitiveType.NODE)) {
                 sb.append("/full");
             } else if (version > 0) {
-                sb.append("/"+version);
+                sb.append('/').append(version);
             }
 
             in = getInputStream(sb.toString(), progressMonitor.createSubTaskMonitor(1, true));
Index: org/openstreetmap/josm/io/OsmServerReader.java
===================================================================
--- org/openstreetmap/josm/io/OsmServerReader.java	(revision 6082)
+++ org/openstreetmap/josm/io/OsmServerReader.java	(working copy)
@@ -127,7 +127,7 @@
                             String s;
                             while((s = in.readLine()) != null) {
                                 errorBody.append(s);
-                                errorBody.append("\n");
+                                errorBody.append('\n');
                             }
                         }
                     }
Index: org/openstreetmap/josm/io/OsmServerWriter.java
===================================================================
--- org/openstreetmap/josm/io/OsmServerWriter.java	(revision 6082)
+++ org/openstreetmap/josm/io/OsmServerWriter.java	(working copy)
@@ -69,7 +69,7 @@
         int ms_left = (int)(uploads_left / uploads_per_ms);
         int minutes_left = ms_left / MSECS_PER_MINUTE;
         int seconds_left = (ms_left / MSECS_PER_SECOND) % SECONDS_PER_MINUTE ;
-        String time_left_str = Integer.toString(minutes_left) + ":";
+        String time_left_str = Integer.toString(minutes_left) + ':';
         if (seconds_left < 10) {
             time_left_str += "0";
         }
Index: org/openstreetmap/josm/io/OsmWriter.java
===================================================================
--- org/openstreetmap/josm/io/OsmWriter.java	(revision 6082)
+++ org/openstreetmap/josm/io/OsmWriter.java	(working copy)
@@ -178,7 +178,7 @@
             out.println("/>");
         } else {
             if (n.getCoor() != null) {
-                out.print(" lat='"+n.getCoor().lat()+"' lon='"+n.getCoor().lon()+"'");
+                out.print(" lat='"+n.getCoor().lat()+"' lon='"+n.getCoor().lon()+ '\'');
             }
             addTags(n, "node", true);
         }
@@ -219,25 +219,25 @@
 
     public void visit(Changeset cs) {
         out.print("  <changeset ");
-        out.print(" id='"+cs.getId()+"'");
+        out.print(" id='"+cs.getId()+ '\'');
         if (cs.getUser() != null) {
-            out.print(" user='"+cs.getUser().getName() +"'");
-            out.print(" uid='"+cs.getUser().getId() +"'");
+            out.print(" user='"+cs.getUser().getName() + '\'');
+            out.print(" uid='"+cs.getUser().getId() + '\'');
         }
         if (cs.getCreatedAt() != null) {
-            out.print(" created_at='"+DateUtils.fromDate(cs.getCreatedAt()) +"'");
+            out.print(" created_at='"+DateUtils.fromDate(cs.getCreatedAt()) + '\'');
         }
         if (cs.getClosedAt() != null) {
-            out.print(" closed_at='"+DateUtils.fromDate(cs.getClosedAt()) +"'");
+            out.print(" closed_at='"+DateUtils.fromDate(cs.getClosedAt()) + '\'');
         }
-        out.print(" open='"+ (cs.isOpen() ? "true" : "false") +"'");
+        out.print(" open='"+ (cs.isOpen() ? "true" : "false") + '\'');
         if (cs.getMin() != null) {
-            out.print(" min_lon='"+ cs.getMin().lonToString(CoordinateFormat.DECIMAL_DEGREES) +"'");
-            out.print(" min_lat='"+ cs.getMin().latToString(CoordinateFormat.DECIMAL_DEGREES) +"'");
+            out.print(" min_lon='"+ cs.getMin().lonToString(CoordinateFormat.DECIMAL_DEGREES) + '\'');
+            out.print(" min_lat='"+ cs.getMin().latToString(CoordinateFormat.DECIMAL_DEGREES) + '\'');
         }
         if (cs.getMax() != null) {
-            out.print(" max_lon='"+ cs.getMin().lonToString(CoordinateFormat.DECIMAL_DEGREES) +"'");
-            out.print(" max_lat='"+ cs.getMin().latToString(CoordinateFormat.DECIMAL_DEGREES) +"'");
+            out.print(" max_lon='"+ cs.getMin().lonToString(CoordinateFormat.DECIMAL_DEGREES) + '\'');
+            out.print(" max_lat='"+ cs.getMin().latToString(CoordinateFormat.DECIMAL_DEGREES) + '\'');
         }
         out.println(">");
         addTags(cs, "changeset", false); // also writes closing </changeset>
@@ -260,11 +260,11 @@
                 out.println("    <tag k='"+ XmlWriter.encode(e.getKey()) +
                         "' v='"+XmlWriter.encode(e.getValue())+ "' />");
             }
-            out.println("  </" + tagname + ">");
+            out.println("  </" + tagname + '>');
         } else if (tagOpen) {
             out.println(" />");
         } else {
-            out.println("  </" + tagname + ">");
+            out.println("  </" + tagname + '>');
         }
     }
 
@@ -275,7 +275,7 @@
     protected void addCommon(IPrimitive osm, String tagname) {
         out.print("  <"+tagname);
         if (osm.getUniqueId() != 0) {
-            out.print(" id='"+ osm.getUniqueId()+"'");
+            out.print(" id='"+ osm.getUniqueId()+ '\'');
         } else
             throw new IllegalStateException(tr("Unexpected id 0 for osm primitive found"));
         if (!isOsmChange) {
@@ -287,31 +287,31 @@
                     action = "modify";
                 }
                 if (action != null) {
-                    out.print(" action='"+action+"'");
+                    out.print(" action='"+action+ '\'');
                 }
             }
             if (!osm.isTimestampEmpty()) {
-                out.print(" timestamp='"+DateUtils.fromDate(osm.getTimestamp())+"'");
+                out.print(" timestamp='"+DateUtils.fromDate(osm.getTimestamp())+ '\'');
             }
             // user and visible added with 0.4 API
             if (osm.getUser() != null) {
                 if(osm.getUser().isLocalUser()) {
-                    out.print(" user='"+XmlWriter.encode(osm.getUser().getName())+"'");
+                    out.print(" user='"+XmlWriter.encode(osm.getUser().getName())+ '\'');
                 } else if (osm.getUser().isOsmUser()) {
                     // uid added with 0.6
-                    out.print(" uid='"+ osm.getUser().getId()+"'");
-                    out.print(" user='"+XmlWriter.encode(osm.getUser().getName())+"'");
+                    out.print(" uid='"+ osm.getUser().getId()+ '\'');
+                    out.print(" user='"+XmlWriter.encode(osm.getUser().getName())+ '\'');
                 }
             }
-            out.print(" visible='"+osm.isVisible()+"'");
+            out.print(" visible='"+osm.isVisible()+ '\'');
         }
         if (osm.getVersion() != 0) {
-            out.print(" version='"+osm.getVersion()+"'");
+            out.print(" version='"+osm.getVersion()+ '\'');
         }
         if (this.changeset != null && this.changeset.getId() != 0) {
-            out.print(" changeset='"+this.changeset.getId()+"'" );
+            out.print(" changeset='"+this.changeset.getId()+ '\'');
         } else if (osm.getChangesetId() > 0 && !osm.isNew()) {
-            out.print(" changeset='"+osm.getChangesetId()+"'" );
+            out.print(" changeset='"+osm.getChangesetId()+ '\'');
         }
     }
 }
Index: org/openstreetmap/josm/io/auth/AbstractCredentialsAgent.java
===================================================================
--- org/openstreetmap/josm/io/auth/AbstractCredentialsAgent.java	(revision 6082)
+++ org/openstreetmap/josm/io/auth/AbstractCredentialsAgent.java	(working copy)
@@ -44,7 +44,7 @@
          * file (username=="") and each time after authentication failed
          * (noSuccessWithLastResponse == true).
          */
-        } else if (noSuccessWithLastResponse || username.equals("") || password.equals("")) {
+        } else if (noSuccessWithLastResponse || username.isEmpty() || password.isEmpty()) {
             GuiHelper.runInEDTAndWait(new Runnable() {
                 @Override
                 public void run() {
Index: org/openstreetmap/josm/io/imagery/ImageryReader.java
===================================================================
--- org/openstreetmap/josm/io/imagery/ImageryReader.java	(revision 6082)
+++ org/openstreetmap/josm/io/imagery/ImageryReader.java	(working copy)
@@ -130,9 +130,9 @@
                 } else if (qName.equals("bounds")) {
                     try {
                         bounds = new ImageryBounds(
-                                atts.getValue("min-lat") + "," +
-                                        atts.getValue("min-lon") + "," +
-                                        atts.getValue("max-lat") + "," +
+                                atts.getValue("min-lat") + ',' +
+                                        atts.getValue("min-lon") + ',' +
+                                        atts.getValue("max-lat") + ',' +
                                         atts.getValue("max-lon"), ",");
                     } catch (IllegalArgumentException e) {
                         break;
Index: org/openstreetmap/josm/io/imagery/WMSGrabber.java
===================================================================
--- org/openstreetmap/josm/io/imagery/WMSGrabber.java	(revision 6082)
+++ org/openstreetmap/josm/io/imagery/WMSGrabber.java	(working copy)
@@ -46,7 +46,7 @@
         super(mv, layer, localOnly);
         this.info = layer.getInfo();
         this.baseURL = info.getUrl();
-        if(layer.getInfo().getCookies() != null && !layer.getInfo().getCookies().equals("")) {
+        if(layer.getInfo().getCookies() != null && !layer.getInfo().getCookies().isEmpty()) {
             props.put("Cookie", layer.getInfo().getCookies());
         }
         Pattern pattern = Pattern.compile("\\{header\\(([^,]+),([^}]+)\\)\\}");
Index: org/openstreetmap/josm/io/imagery/WMSImagery.java
===================================================================
--- org/openstreetmap/josm/io/imagery/WMSImagery.java	(revision 6082)
+++ org/openstreetmap/josm/io/imagery/WMSImagery.java	(working copy)
@@ -72,15 +72,15 @@
         a.append("://");
         a.append(serviceUrl.getHost());
         if (serviceUrl.getPort() != -1) {
-            a.append(":");
+            a.append(':');
             a.append(serviceUrl.getPort());
         }
         a.append(serviceUrl.getPath());
-        a.append("?");
+        a.append('?');
         if (serviceUrl.getQuery() != null) {
             a.append(serviceUrl.getQuery());
             if (!serviceUrl.getQuery().isEmpty() && !serviceUrl.getQuery().endsWith("&")) {
-                a.append("&");
+                a.append('&');
             }
         }
         return a.toString();
@@ -110,9 +110,9 @@
                 getCapabilitiesUrl = new URL(serviceUrlStr);
                 final String getCapabilitiesQuery = "VERSION=1.1.1&SERVICE=WMS&REQUEST=GetCapabilities";
                 if (getCapabilitiesUrl.getQuery() == null) {
-                    getCapabilitiesUrl = new URL(serviceUrlStr + "?" + getCapabilitiesQuery);
+                    getCapabilitiesUrl = new URL(serviceUrlStr + '?' + getCapabilitiesQuery);
                 } else if (!getCapabilitiesUrl.getQuery().isEmpty() && !getCapabilitiesUrl.getQuery().endsWith("&")) {
-                    getCapabilitiesUrl = new URL(serviceUrlStr + "&" + getCapabilitiesQuery);
+                    getCapabilitiesUrl = new URL(serviceUrlStr + '&' + getCapabilitiesQuery);
                 } else {
                     getCapabilitiesUrl = new URL(serviceUrlStr + getCapabilitiesQuery);
                 }
@@ -134,7 +134,7 @@
         StringBuilder ba = new StringBuilder();
         while ((line = br.readLine()) != null) {
             ba.append(line);
-            ba.append("\n");
+            ba.append('\n');
         }
         String incomingData = ba.toString();
 
Index: org/openstreetmap/josm/io/imagery/WMSRequest.java
===================================================================
--- org/openstreetmap/josm/io/imagery/WMSRequest.java	(revision 6082)
+++ org/openstreetmap/josm/io/imagery/WMSRequest.java	(working copy)
@@ -107,7 +107,7 @@
     @Override
     public String toString() {
         return "WMSRequest [xIndex=" + xIndex + ", yIndex=" + yIndex
-                + ", pixelPerDegree=" + pixelPerDegree + "]";
+                + ", pixelPerDegree=" + pixelPerDegree + ']';
     }
 
     public boolean isReal() {
Index: org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java
===================================================================
--- org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java	(revision 6082)
+++ org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java	(working copy)
@@ -102,14 +102,14 @@
         {
             command = command.substring(1);
         }
-        String commandWithSlash = "/" + command;
+        String commandWithSlash = '/' + command;
         if (handlers.get(commandWithSlash) != null) {
             System.out.println("RemoteControl: ignoring duplicate command " + command
                     + " with handler " + handler.getName());
         } else {
             if (!silent) {
                 System.out.println("RemoteControl: adding command \"" +
-                    command + "\" (handled by " + handler.getSimpleName() + ")");
+                    command + "\" (handled by " + handler.getSimpleName() + ')');
             }
             handlers.put(commandWithSlash, handler);
         }
Index: org/openstreetmap/josm/io/remotecontrol/handler/AddNodeHandler.java
===================================================================
--- org/openstreetmap/josm/io/remotecontrol/handler/AddNodeHandler.java	(revision 6082)
+++ org/openstreetmap/josm/io/remotecontrol/handler/AddNodeHandler.java	(working copy)
@@ -62,7 +62,7 @@
     private void addNode(HashMap<String, String> args){
 
         // Parse the arguments
-        System.out.println("Adding node at (" + lat + ", " + lon + ")");
+        System.out.println("Adding node at (" + lat + ", " + lon + ')');
 
         // Create a new node
         LatLon ll = new LatLon(lat, lon);
@@ -99,7 +99,7 @@
             lat = Double.parseDouble(args.get("lat"));
             lon = Double.parseDouble(args.get("lon"));
         } catch (NumberFormatException e) {
-            throw new RequestHandlerBadRequestException("NumberFormatException ("+e.getMessage()+")");
+            throw new RequestHandlerBadRequestException("NumberFormatException ("+e.getMessage()+ ')');
         }
         if (!Main.main.hasEditLayer()) {
              throw new RequestHandlerBadRequestException(tr("There is no layer opened to add node"));
Index: org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java
===================================================================
--- org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java	(revision 6082)
+++ org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java	(working copy)
@@ -81,7 +81,7 @@
                 double lon = Double.parseDouble(coordinates[1]);
                 allCoordinates.add(new LatLon(lat, lon));
             } catch (NumberFormatException e) {
-                throw new RequestHandlerBadRequestException("NumberFormatException ("+e.getMessage()+")");
+                throw new RequestHandlerBadRequestException("NumberFormatException ("+e.getMessage()+ ')');
             }
         }
         if (allCoordinates.isEmpty()) {
Index: org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java
===================================================================
--- org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java	(revision 6082)
+++ org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java	(working copy)
@@ -53,7 +53,7 @@
             try {
                 imgInfo.setDefaultMinZoom(Integer.parseInt(min_zoom));
             } catch (NumberFormatException e) {
-                System.err.println("NumberFormatException ("+e.getMessage()+")");
+                System.err.println("NumberFormatException ("+e.getMessage()+ ')');
             }
         }
         String max_zoom = args.get("max_zoom");
@@ -61,7 +61,7 @@
             try {
                 imgInfo.setDefaultMaxZoom(Integer.parseInt(max_zoom));
             } catch (NumberFormatException e) {
-                System.err.println("NumberFormatException ("+e.getMessage()+")");
+                System.err.println("NumberFormatException ("+e.getMessage()+ ')');
             }
         }
         GuiHelper.runInEDT(new Runnable() {
Index: org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java
===================================================================
--- org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java	(revision 6082)
+++ org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java	(working copy)
@@ -221,7 +221,7 @@
             minlon = LatLon.roundToOsmPrecision(Double.parseDouble(args.get("left")));
             maxlon = LatLon.roundToOsmPrecision(Double.parseDouble(args.get("right")));
         } catch (NumberFormatException e) {
-            throw new RequestHandlerBadRequestException("NumberFormatException ("+e.getMessage()+")");
+            throw new RequestHandlerBadRequestException("NumberFormatException ("+e.getMessage()+ ')');
         }
 
         // Process optional argument 'select'
Index: org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java
===================================================================
--- org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java	(revision 6082)
+++ org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java	(working copy)
@@ -201,7 +201,7 @@
             String value = args.get(key);
             if ((value == null) || (value.length() == 0)) {
                 error = true;
-                System.out.println("'" + myCommand + "' remote control request must have '" + key + "' parameter");
+                System.out.println('\'' + myCommand + "' remote control request must have '" + key + "' parameter");
                 missingKeys.add(key);
             }
         }
Index: org/openstreetmap/josm/io/remotecontrol/handler/VersionHandler.java
===================================================================
--- org/openstreetmap/josm/io/remotecontrol/handler/VersionHandler.java	(revision 6082)
+++ org/openstreetmap/josm/io/remotecontrol/handler/VersionHandler.java	(working copy)
@@ -22,7 +22,7 @@
         content = RequestProcessor.PROTOCOLVERSION;
         contentType = "application/json";
         if (args.containsKey("jsonp")) {
-            content = args.get("jsonp") + " && " + args.get("jsonp") + "(" + content + ")";
+            content = args.get("jsonp") + " && " + args.get("jsonp") + '(' + content + ')';
         }
     }
 
Index: org/openstreetmap/josm/io/session/GpxTracksSessionImporter.java
===================================================================
--- org/openstreetmap/josm/io/session/GpxTracksSessionImporter.java	(revision 6082)
+++ org/openstreetmap/josm/io/session/GpxTracksSessionImporter.java	(working copy)
@@ -32,7 +32,7 @@
             XPath xpath = xPathFactory.newXPath();
             XPathExpression fileExp = xpath.compile("file/text()");
             String fileStr = (String) fileExp.evaluate(elem, XPathConstants.STRING);
-            if (fileStr == null || fileStr.equals("")) {
+            if (fileStr == null || fileStr.isEmpty()) {
                 throw new IllegalDataException(tr("File name expected for layer no. {0}", support.getLayerIndex()));
             }
 
Index: org/openstreetmap/josm/io/session/MarkerSessionImporter.java
===================================================================
--- org/openstreetmap/josm/io/session/MarkerSessionImporter.java	(revision 6082)
+++ org/openstreetmap/josm/io/session/MarkerSessionImporter.java	(working copy)
@@ -36,7 +36,7 @@
             XPath xpath = xPathFactory.newXPath();
             XPathExpression fileExp = xpath.compile("file/text()");
             String fileStr = (String) fileExp.evaluate(elem, XPathConstants.STRING);
-            if (fileStr == null || fileStr.equals("")) {
+            if (fileStr == null || fileStr.isEmpty()) {
                 throw new IllegalDataException(tr("File name expected for layer no. {0}", support.getLayerIndex()));
             }
 
Index: org/openstreetmap/josm/io/session/OsmDataSessionImporter.java
===================================================================
--- org/openstreetmap/josm/io/session/OsmDataSessionImporter.java	(revision 6082)
+++ org/openstreetmap/josm/io/session/OsmDataSessionImporter.java	(working copy)
@@ -33,7 +33,7 @@
             XPath xpath = xPathFactory.newXPath();
             XPathExpression fileExp = xpath.compile("file/text()");
             String fileStr = (String) fileExp.evaluate(elem, XPathConstants.STRING);
-            if (fileStr == null || fileStr.equals("")) {
+            if (fileStr == null || fileStr.isEmpty()) {
                 throw new IllegalDataException(tr("File name expected for layer no. {0}", support.getLayerIndex()));
             }
 
Index: org/openstreetmap/josm/plugins/PluginHandler.java
===================================================================
--- org/openstreetmap/josm/plugins/PluginHandler.java	(revision 6082)
+++ org/openstreetmap/josm/plugins/PluginHandler.java	(working copy)
@@ -214,7 +214,7 @@
         for (DeprecatedPlugin depr: removedPlugins) {
             sb.append("<li>").append(depr.name);
             if (depr.reason != null) {
-                sb.append(" (").append(depr.reason).append(")");
+                sb.append(" (").append(depr.reason).append(')');
             }
             sb.append("</li>");
         }
@@ -1119,7 +1119,7 @@
         int pos = stack.length;
         for (PluginProxy p : pluginList) {
             String baseClass = p.getPluginInformation().className;
-            baseClass = baseClass.substring(0, baseClass.lastIndexOf("."));
+            baseClass = baseClass.substring(0, baseClass.lastIndexOf('.'));
             for (int elpos = 0; elpos < pos; ++elpos) {
                 if (stack[elpos].getClassName().startsWith(baseClass)) {
                     pos = elpos;
@@ -1179,12 +1179,12 @@
         for (final PluginProxy pp : pluginList) {
             PluginInformation pi = pp.getPluginInformation();
             pl.remove(pi.name);
-            pl.add(pi.name + " (" + (pi.localversion != null && !pi.localversion.equals("")
-                    ? pi.localversion : "unknown") + ")");
+            pl.add(pi.name + " (" + (pi.localversion != null && !pi.localversion.isEmpty()
+                    ? pi.localversion : "unknown") + ')');
         }
         Collections.sort(pl);
         for (String s : pl) {
-            text += "Plugin: " + s + "\n";
+            text += "Plugin: " + s + '\n';
         }
         return text;
     }
@@ -1194,7 +1194,7 @@
         for (final PluginProxy p : pluginList) {
             final PluginInformation info = p.getPluginInformation();
             String name = info.name
-            + (info.version != null && !info.version.equals("") ? " Version: " + info.version : "");
+            + (info.version != null && !info.version.isEmpty() ? " Version: " + info.version : "");
             pluginTab.add(new JLabel(name), GBC.std());
             pluginTab.add(Box.createHorizontalGlue(), GBC.std().fill(GBC.HORIZONTAL));
             pluginTab.add(new JButton(new AbstractAction(tr("Information")) {
@@ -1204,7 +1204,7 @@
                         b.append(e.getKey());
                         b.append(": ");
                         b.append(e.getValue());
-                        b.append("\n");
+                        b.append('\n');
                     }
                     JosmTextArea a = new JosmTextArea(10, 40);
                     a.setEditable(false);
Index: org/openstreetmap/josm/plugins/PluginInformation.java
===================================================================
--- org/openstreetmap/josm/plugins/PluginInformation.java	(revision 6082)
+++ org/openstreetmap/josm/plugins/PluginInformation.java	(working copy)
@@ -229,7 +229,7 @@
                         if(mv <= myv && (mv > mainversion || mainversion > myv))
                         {
                             String v = (String)entry.getValue();
-                            int i = v.indexOf(";");
+                            int i = v.indexOf(';');
                             if(i > 0)
                             {
                                 downloadlink = v.substring(i+1);
@@ -277,7 +277,7 @@
         }
         if (downloadlink != null && !downloadlink.startsWith("http://svn.openstreetmap.org/applications/editors/josm/dist/")
         && !downloadlink.startsWith("http://trac.openstreetmap.org/browser/applications/editors/josm/dist/")) {
-            sb.append("<p>&nbsp;</p><p>"+tr("<b>Plugin provided by an external source:</b> {0}", downloadlink)+"</p>");
+            sb.append("<p>&nbsp;</p><p>").append(tr("<b>Plugin provided by an external source:</b> {0}", downloadlink)).append("</p>");
         }
         sb.append("</body></html>");
         return sb.toString();
Index: org/openstreetmap/josm/plugins/PluginListParser.java
===================================================================
--- org/openstreetmap/josm/plugins/PluginListParser.java	(revision 6082)
+++ org/openstreetmap/josm/plugins/PluginListParser.java	(working copy)
@@ -77,10 +77,10 @@
                 if (line.startsWith("\t")) {
                     line = line.substring(1);
                     while (line.length() > 70) {
-                        manifest.append(line.substring(0, 70)).append("\n");
-                        line = " " + line.substring(70);
+                        manifest.append(line.substring(0, 70)).append('\n');
+                        line = ' ' + line.substring(70);
                     }
-                    manifest.append(line).append("\n");
+                    manifest.append(line).append('\n');
                     continue;
                 }
                 addPluginInformation(ret, name, url, manifest.toString());
Index: org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java
===================================================================
--- org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java	(revision 6082)
+++ org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java	(working copy)
@@ -107,9 +107,9 @@
             URL url = new URL(site);
             StringBuilder sb = new StringBuilder();
             sb.append("site-");
-            sb.append(url.getHost()).append("-");
+            sb.append(url.getHost()).append('-');
             if (url.getPort() != -1) {
-                sb.append(url.getPort()).append("-");
+                sb.append(url.getPort()).append('-');
             }
             String path = url.getPath();
             for (int i =0;i<path.length(); i++) {
@@ -117,7 +117,7 @@
                 if (Character.isLetterOrDigit(c)) {
                     sb.append(c);
                 } else {
-                    sb.append("_");
+                    sb.append('_');
                 }
             }
             switch (type) {
@@ -167,7 +167,7 @@
             in = new BufferedReader(new InputStreamReader(connection.getInputStream(), "UTF-8"));
             String line;
             while((line = in.readLine()) != null) {
-                sb.append(line).append("\n");
+                sb.append(line).append('\n');
             }
             return sb.toString();
         } catch(MalformedURLException e) {
Index: org/openstreetmap/josm/tools/BugReportExceptionHandler.java
===================================================================
--- org/openstreetmap/josm/tools/BugReportExceptionHandler.java	(revision 6082)
+++ org/openstreetmap/josm/tools/BugReportExceptionHandler.java	(working copy)
@@ -121,7 +121,7 @@
                             if(urltext.length() > maxlen)
                             {
                                 urltext = urltext.substring(0,maxlen);
-                                int idx = urltext.lastIndexOf("\n");
+                                int idx = urltext.lastIndexOf('\n');
                                 /* cut whole line when not loosing too much */
                                 if(maxlen-idx < 200) {
                                     urltext = urltext.substring(0,idx+1);
Index: org/openstreetmap/josm/tools/ColorHelper.java
===================================================================
--- org/openstreetmap/josm/tools/ColorHelper.java	(revision 6082)
+++ org/openstreetmap/josm/tools/ColorHelper.java	(working copy)
@@ -32,6 +32,6 @@
     public static String color2html(Color col) {
         if (col == null)
             return null;
-        return "#"+int2hex(col.getRed())+int2hex(col.getGreen())+int2hex(col.getBlue());
+        return '#' +int2hex(col.getRed())+int2hex(col.getGreen())+int2hex(col.getBlue());
     }
 }
Index: org/openstreetmap/josm/tools/ExceptionUtil.java
===================================================================
--- org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 6082)
+++ org/openstreetmap/josm/tools/ExceptionUtil.java	(working copy)
@@ -271,7 +271,7 @@
         String msg = null;
         if (header != null) {
             if (body != null && !header.equals(body)) {
-                msg = header + " (" + body + ")";
+                msg = header + " (" + body + ')';
             } else {
                 msg = header;
             }
@@ -428,7 +428,7 @@
      */
     public static String explainGeneric(Exception e) {
         String msg = e.getMessage();
-        if (msg == null || msg.trim().equals("")) {
+        if (msg == null || msg.trim().isEmpty()) {
             msg = e.toString();
         }
         e.printStackTrace();
Index: org/openstreetmap/josm/tools/I18n.java
===================================================================
--- org/openstreetmap/josm/tools/I18n.java	(revision 6082)
+++ org/openstreetmap/josm/tools/I18n.java	(working copy)
@@ -254,19 +254,19 @@
     private static final String gettext(String text, String ctx, boolean lazy)
     {
         int i;
-        if(ctx == null && text.startsWith("_:") && (i = text.indexOf("\n")) >= 0)
+        if(ctx == null && text.startsWith("_:") && (i = text.indexOf('\n')) >= 0)
         {
             ctx = text.substring(2,i-1);
             text = text.substring(i+1);
         }
         if(strings != null)
         {
-            String trans = strings.get(ctx == null ? text : "_:"+ctx+"\n"+text);
+            String trans = strings.get(ctx == null ? text : "_:"+ctx+ '\n' +text);
             if(trans != null)
                 return trans;
         }
         if(pstrings != null) {
-            String[] trans = pstrings.get(ctx == null ? text : "_:"+ctx+"\n"+text);
+            String[] trans = pstrings.get(ctx == null ? text : "_:"+ctx+ '\n' +text);
             if(trans != null)
                 return trans[0];
         }
@@ -286,7 +286,7 @@
     private static final String gettextn(String text, String plural, String ctx, long num)
     {
         int i;
-        if(ctx == null && text.startsWith("_:") && (i = text.indexOf("\n")) >= 0)
+        if(ctx == null && text.startsWith("_:") && (i = text.indexOf('\n')) >= 0)
         {
             ctx = text.substring(2,i-1);
             text = text.substring(i+1);
@@ -294,7 +294,7 @@
         if(pstrings != null)
         {
             i = pluralEval(num);
-            String[] trans = pstrings.get(ctx == null ? text : "_:"+ctx+"\n"+text);
+            String[] trans = pstrings.get(ctx == null ? text : "_:"+ctx+ '\n' +text);
             if(trans != null && trans.length > i)
                 return trans[i];
         }
Index: org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- org/openstreetmap/josm/tools/ImageProvider.java	(revision 6082)
+++ org/openstreetmap/josm/tools/ImageProvider.java	(working copy)
@@ -402,7 +402,7 @@
 
             if (subdir == null) {
                 subdir = "";
-            } else if (!subdir.equals("")) {
+            } else if (!subdir.isEmpty()) {
                 subdir += "/";
             }
             String[] extensions;
@@ -425,9 +425,9 @@
                     String cache_name = full_name;
                     /* cache separately */
                     if (dirs != null && dirs.size() > 0) {
-                        cache_name = "id:" + id + ":" + full_name;
+                        cache_name = "id:" + id + ':' + full_name;
                         if(archive != null) {
-                            cache_name += ":" + archive.getName();
+                            cache_name += ':' + archive.getName();
                         }
                     }
 
@@ -510,7 +510,7 @@
                 }
             } else {
                 final String fn_md5 = Utils.md5Hex(fn);
-                url = b + fn_md5.substring(0,1) + "/" + fn_md5.substring(0,2) + "/" + fn;
+                url = b + fn_md5.substring(0,1) + '/' + fn_md5.substring(0,2) + '/' + fn;
             }
             result = getIfAvailableHttp(url, type);
             if (result != null) {
Index: org/openstreetmap/josm/tools/LanguageInfo.java
===================================================================
--- org/openstreetmap/josm/tools/LanguageInfo.java	(revision 6082)
+++ org/openstreetmap/josm/tools/LanguageInfo.java	(working copy)
@@ -44,7 +44,7 @@
             }
         } else if(type == LocaleType.DEFAULTNOTENGLISH && code == "en")
             return null;
-        return code.substring(0,1).toUpperCase() + code.substring(1) + ":";
+        return code.substring(0,1).toUpperCase() + code.substring(1) + ':';
     }
 
     /**
@@ -119,10 +119,10 @@
 
     static public String getLanguageCodeXML()
     {
-        return getJOSMLocaleCode()+".";
+        return getJOSMLocaleCode()+ '.';
     }
     static public String getLanguageCodeManifest()
     {
-        return getJOSMLocaleCode()+"_";
+        return getJOSMLocaleCode()+ '_';
     }
 }
Index: org/openstreetmap/josm/tools/MultiMap.java
===================================================================
--- org/openstreetmap/josm/tools/MultiMap.java	(revision 6082)
+++ org/openstreetmap/josm/tools/MultiMap.java	(working copy)
@@ -162,8 +162,8 @@
     public String toString() {
         List<String> entries = new ArrayList<String>(map.size());
         for (A key : map.keySet()) {
-            entries.add(key + "->{" + Utils.join(",", map.get(key)) + "}");
+            entries.add(key + "->{" + Utils.join(",", map.get(key)) + '}');
         }
-        return "(" + Utils.join(",", entries) + ")";
+        return '(' + Utils.join(",", entries) + ')';
     }
 }
Index: org/openstreetmap/josm/tools/MultikeyActionsHandler.java
===================================================================
--- org/openstreetmap/josm/tools/MultikeyActionsHandler.java	(revision 6082)
+++ org/openstreetmap/josm/tools/MultikeyActionsHandler.java	(working copy)
@@ -127,7 +127,7 @@
     }
 
     private String formatMenuText(KeyStroke keyStroke, String index, String description) {
-        String shortcutText = KeyEvent.getKeyModifiersText(keyStroke.getModifiers()) + "+" + KeyEvent.getKeyText(keyStroke.getKeyCode()) + "," + index;
+        String shortcutText = KeyEvent.getKeyModifiersText(keyStroke.getModifiers()) + '+' + KeyEvent.getKeyText(keyStroke.getKeyCode()) + ',' + index;
 
         return "<html><i>" + shortcutText + "</i>&nbsp;&nbsp;&nbsp;&nbsp;" + description;
 
Index: org/openstreetmap/josm/tools/OsmUrlToBounds.java
===================================================================
--- org/openstreetmap/josm/tools/OsmUrlToBounds.java	(revision 6082)
+++ org/openstreetmap/josm/tools/OsmUrlToBounds.java	(working copy)
@@ -73,7 +73,7 @@
     private static double parseDouble(HashMap<String, String> map, String key) {
         if (map.containsKey(key))
             return Double.parseDouble(map.get(key));
-        return Double.parseDouble(map.get("m"+key));
+        return Double.parseDouble(map.get('m' +key));
     }
 
     private static final char[] SHORTLINK_CHARS = {
Index: org/openstreetmap/josm/tools/Pair.java
===================================================================
--- org/openstreetmap/josm/tools/Pair.java	(revision 6082)
+++ org/openstreetmap/josm/tools/Pair.java	(working copy)
@@ -44,7 +44,7 @@
 
     @Override
     public String toString() {
-        return "<"+a+","+b+">";
+        return "<" + a + ',' + b + '>';
     }
 
     /* convenience constructor method */
Index: org/openstreetmap/josm/tools/PlatformHookOsx.java
===================================================================
--- org/openstreetmap/josm/tools/PlatformHookOsx.java	(revision 6082)
+++ org/openstreetmap/josm/tools/PlatformHookOsx.java	(working copy)
@@ -227,7 +227,7 @@
             if (canHtml) {
                 result += "<font size='-2'>";
             }
-            result += "("+sc.getKeyText()+")";
+            result += '(' +sc.getKeyText()+ ')';
             if (canHtml) {
                 result += "</font>";
             }
@@ -255,6 +255,6 @@
      */
     @Override
     public String getOSDescription() {
-        return System.getProperty("os.name") + " " + System.getProperty("os.version");
+        return System.getProperty("os.name") + ' ' + System.getProperty("os.version");
     }
 }
Index: org/openstreetmap/josm/tools/PlatformHookUnixoid.java
===================================================================
--- org/openstreetmap/josm/tools/PlatformHookUnixoid.java	(revision 6082)
+++ org/openstreetmap/josm/tools/PlatformHookUnixoid.java	(working copy)
@@ -36,7 +36,7 @@
         String[] programs = {"gnome-open", "kfmclient openURL", "firefox"};
         for (String program : programs) {
             try {
-                Runtime.getRuntime().exec(program+" "+url);
+                Runtime.getRuntime().exec(program+ ' ' +url);
                 return;
             } catch (IOException e) {
             }
@@ -64,7 +64,7 @@
         if (sc != null && sc.getKeyText().length() != 0) {
             result += " ";
             result += "<font size='-2'>";
-            result += "("+sc.getKeyText()+")";
+            result += '(' +sc.getKeyText()+ ')';
             result += "</font>";
         }
         result += "&nbsp;</html>";
@@ -166,7 +166,7 @@
 
         @Override public String toString() {
             return "ReleaseInfo [path=" + path + ", descriptionField=" + descriptionField +
-                    ", idField=" + idField + ", releaseField=" + releaseField + "]";
+                    ", idField=" + idField + ", releaseField=" + releaseField + ']';
         }
 
         /**
@@ -204,7 +204,7 @@
                         }
                         // If no description has been found, try to rebuild it with "id" + "release" (i.e. "name" + "version")
                         if (result == null && id != null && release != null) {
-                            result = id + " " + release;
+                            result = id + ' ' + release;
                         }
                     } catch (IOException e) {
                         // Ignore
Index: org/openstreetmap/josm/tools/PlatformHookWindows.java
===================================================================
--- org/openstreetmap/josm/tools/PlatformHookWindows.java	(revision 6082)
+++ org/openstreetmap/josm/tools/PlatformHookWindows.java	(working copy)
@@ -128,7 +128,7 @@
      */
     @Override
     public String getOSDescription() {
-        return Utils.strip(System.getProperty("os.name")) + " " +
+        return Utils.strip(System.getProperty("os.name")) + ' ' +
                 ((System.getenv("ProgramFiles(x86)") == null) ? "32" : "64") + "-Bit";
     }
 }
Index: org/openstreetmap/josm/tools/Shortcut.java
===================================================================
--- org/openstreetmap/josm/tools/Shortcut.java	(revision 6082)
+++ org/openstreetmap/josm/tools/Shortcut.java	(working copy)
@@ -225,8 +225,8 @@
         KeyStroke keyStroke = getKeyStroke();
         if (keyStroke == null) return "";
         String modifText = KeyEvent.getKeyModifiersText(keyStroke.getModifiers());
-        if ("".equals (modifText)) return KeyEvent.getKeyText (keyStroke.getKeyCode ());
-        return modifText + "+" + KeyEvent.getKeyText(keyStroke.getKeyCode ());
+        if (modifText != null && modifText.isEmpty()) return KeyEvent.getKeyText (keyStroke.getKeyCode ());
+        return modifText + '+' + KeyEvent.getKeyText(keyStroke.getKeyCode ());
     }
 
     @Override
Index: org/openstreetmap/josm/tools/TextTagParser.java
===================================================================
--- org/openstreetmap/josm/tools/TextTagParser.java	(revision 6082)
+++ org/openstreetmap/josm/tools/TextTagParser.java	(working copy)
@@ -247,7 +247,7 @@
         for (String key: tags.keySet()) {
             value = tags.get(key);
             if (key.length() > MAX_KEY_LENGTH) {
-                r = warning(tr("Key is too long (max {0} characters):", MAX_KEY_LENGTH), key+"="+value, "tags.paste.keytoolong");
+                r = warning(tr("Key is too long (max {0} characters):", MAX_KEY_LENGTH), key+ '=' +value, "tags.paste.keytoolong");
                 if (r==2 || r==3) return false; if (r==4) return true;
             }
             if (!key.matches(KEY_PATTERN)) {
Index: org/openstreetmap/josm/tools/WikiReader.java
===================================================================
--- org/openstreetmap/josm/tools/WikiReader.java	(revision 6082)
+++ org/openstreetmap/josm/tools/WikiReader.java	(working copy)
@@ -88,7 +88,7 @@
         String b = "";
         for (String line = in.readLine(); line != null; line = in.readLine()) {
             if (!line.contains("[[TranslatedPages]]")) {
-                b += line.replaceAll(" />", ">") + "\n";
+                b += line.replaceAll(" />", ">") + '\n';
             }
         }
         return "<html>" + b + "</html>";
@@ -123,9 +123,9 @@
                 //
                 b += line.replaceAll("<img ", "<img border=\"0\" ")
                          .replaceAll("<span class=\"icon\">.</span>", "")
-                         .replaceAll("href=\"/", "href=\"" + baseurl + "/")
+                         .replaceAll("href=\"/", "href=\"" + baseurl + '/')
                          .replaceAll(" />", ">")
-                         + "\n";
+                         + '\n';
             } else if (transl && line.contains("</div>")) {
                 transl = false;
             }
Index: org/openstreetmap/josm/tools/WindowGeometry.java
===================================================================
--- org/openstreetmap/josm/tools/WindowGeometry.java	(revision 6082)
+++ org/openstreetmap/josm/tools/WindowGeometry.java	(working copy)
@@ -162,7 +162,7 @@
 
     protected void initFromPreferences(String preferenceKey) throws WindowGeometryException {
         String value = Main.pref.get(preferenceKey);
-        if (value == null || value.equals(""))
+        if (value == null || value.isEmpty())
             throw new WindowGeometryException(tr("Preference with key ''{0}'' does not exist. Cannot restore window geometry from preferences.", preferenceKey));
         topLeft = new Point();
         extent = new Dimension();
@@ -248,9 +248,9 @@
      */
     public void remember(String preferenceKey) {
         StringBuffer value = new StringBuffer();
-        value.append("x=").append(topLeft.x).append(",")
-        .append("y=").append(topLeft.y).append(",")
-        .append("width=").append(extent.width).append(",")
+        value.append("x=").append(topLeft.x).append(',')
+        .append("y=").append(topLeft.y).append(',')
+        .append("width=").append(extent.width).append(',')
         .append("height=").append(extent.height);
         Main.pref.put(preferenceKey, value.toString());
     }
@@ -390,6 +390,6 @@
     }
 
     public String toString() {
-        return "WindowGeometry{topLeft="+topLeft+",extent="+extent+"}";
+        return "WindowGeometry{topLeft="+topLeft+",extent="+extent+ '}';
     }
 }
Index: org/openstreetmap/josm/tools/XmlObjectParser.java
===================================================================
--- org/openstreetmap/josm/tools/XmlObjectParser.java	(revision 6082)
+++ org/openstreetmap/josm/tools/XmlObjectParser.java	(working copy)
@@ -75,7 +75,7 @@
             if (msg == null) {
                 msg = getClass().getName();
             }
-            msg = msg + " " + tr("(at line {0}, column {1})", lineNumber, columnNumber);
+            msg = msg + ' ' + tr("(at line {0}, column {1})", lineNumber, columnNumber);
             return msg;
         }
 
@@ -100,7 +100,7 @@
 
         @Override
         public void startElement (String uri, String localName, String qName, Attributes atts) throws SAXException {
-            if ("".equals(uri)) {
+            if (uri != null && uri.isEmpty()) {
                 super.startElement(namespace, localName, qName, atts);
             } else {
                 super.startElement(uri, localName, qName, atts);
Index: org/openstreetmap/josm/tools/template_engine/Condition.java
===================================================================
--- org/openstreetmap/josm/tools/template_engine/Condition.java	(revision 6082)
+++ org/openstreetmap/josm/tools/template_engine/Condition.java	(working copy)
@@ -46,11 +46,11 @@
             if (entry instanceof SearchExpressionCondition) {
                 sb.append(entry.toString());
             } else {
-                sb.append("'");
+                sb.append('\'');
                 sb.append(entry.toString());
-                sb.append("'");
+                sb.append('\'');
             }
-            sb.append("|");
+            sb.append('|');
         }
         return sb.toString();
     }
Index: org/openstreetmap/josm/tools/template_engine/SearchExpressionCondition.java
===================================================================
--- org/openstreetmap/josm/tools/template_engine/SearchExpressionCondition.java	(revision 6082)
+++ org/openstreetmap/josm/tools/template_engine/SearchExpressionCondition.java	(working copy)
@@ -25,7 +25,7 @@
 
     @Override
     public String toString() {
-        return condition.toString() + " '" + text.toString() + "'";
+        return condition.toString() + " '" + text.toString() + '\'';
     }
 
 }
Index: org/openstreetmap/josm/tools/template_engine/Tokenizer.java
===================================================================
--- org/openstreetmap/josm/tools/template_engine/Tokenizer.java	(revision 6082)
+++ org/openstreetmap/josm/tools/template_engine/Tokenizer.java	(working copy)
@@ -35,7 +35,7 @@
 
         @Override
         public String toString() {
-            return type + (text != null?" " + text:"");
+            return type + (text != null? ' ' + text:"");
         }
     }
 
Index: org/openstreetmap/josm/tools/template_engine/Variable.java
===================================================================
--- org/openstreetmap/josm/tools/template_engine/Variable.java	(revision 6082)
+++ org/openstreetmap/josm/tools/template_engine/Variable.java	(working copy)
@@ -35,7 +35,7 @@
                 } else {
                     first = false;
                 }
-                result.append(key).append("=").append(dataProvider.getTemplateValue(key, false));
+                result.append(key).append('=').append(dataProvider.getTemplateValue(key, false));
             }
         } else {
             Object value = dataProvider.getTemplateValue(variableName, special);
@@ -55,7 +55,7 @@
 
     @Override
     public String toString() {
-        return "{" + variableName + "}";
+        return '{' + variableName + '}';
     }
 
     public boolean isSpecial() {
