Index: trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java	(revision 6087)
@@ -238,5 +238,5 @@
         @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().isEmpty() &&
                     OffsetBookmark.getBookmarkByName(layer, tBookmarkName.getText()) != null) {
                 if (!confirmOverwriteBookmark()) return;
@@ -252,5 +252,5 @@
             if (getValue() != 1) {
                 layer.setOffset(oldDx, oldDy);
-            } else if (tBookmarkName.getText() != null && !"".equals(tBookmarkName.getText())) {
+            } else if (tBookmarkName.getText() != null && !tBookmarkName.getText().isEmpty()) {
                 OffsetBookmark.bookmarkOffset(tBookmarkName.getText(), layer);
             }
Index: trunk/src/org/openstreetmap/josm/actions/Map_Rectifier_WMSmenuAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/Map_Rectifier_WMSmenuAction.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/actions/Map_Rectifier_WMSmenuAction.java	(revision 6087)
@@ -126,5 +126,5 @@
             // 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);
@@ -133,5 +133,5 @@
             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));
@@ -142,5 +142,5 @@
 
         // Fallback in case no match was found
-        if(tfWmsUrl.getText().equals("") && firstBtn != null) {
+        if(tfWmsUrl.getText().isEmpty() && firstBtn != null) {
             firstBtn.setSelected(true);
         }
@@ -175,5 +175,5 @@
                 // We've reached the custom WMS URL service
                 // Just set the URL and hope everything works out
-                if(s.wmsUrl.equals("")) {
+                if(s.wmsUrl.isEmpty()) {
                     addWMSLayer(s.name + " (" + text + ")", text);
                     break outer;
Index: trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 6087)
@@ -680,5 +680,5 @@
         @Override public boolean match(OsmPrimitive osm) {
             if (!osm.hasKeys() && osm.getUser() == null)
-                return search.equals("");
+                return search.isEmpty();
 
             for (String key: osm.keySet()) {
Index: trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 6087)
@@ -441,5 +441,5 @@
         putDefault(key, def);
         final String prop = properties.get(key);
-        if (prop == null || prop.equals(""))
+        if (prop == null || prop.isEmpty())
             return def;
         return prop;
@@ -774,13 +774,13 @@
         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.isEmpty() ? null : ColorHelper.html2color(colStr);
     }
 
Index: trunk/src/org/openstreetmap/josm/data/Version.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Version.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/data/Version.java	(revision 6087)
@@ -79,5 +79,5 @@
         Pattern p = Pattern.compile("^([^:]+):(.*)$");
         for (String line: content.split("\n")) {
-            if (line == null || line.trim().equals("")) {
+            if (line == null || line.trim().isEmpty()) {
                 continue;
             }
Index: trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java	(revision 6087)
@@ -127,5 +127,5 @@
     // 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.isEmpty() && !b.isEmpty() && (a.contains(b) || b.contains(a)));
     }
 
Index: trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java	(revision 6087)
@@ -602,5 +602,5 @@
             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 {
Index: trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 6087)
@@ -573,5 +573,5 @@
      */
     private boolean toggleCheckState(String togglePref) {
-        toggleable = togglePref != null && !togglePref.equals("");
+        toggleable = togglePref != null && !togglePref.isEmpty();
 
         toggleValue = Main.pref.getInteger("message."+togglePref+".value", -1);
Index: trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java	(revision 6087)
@@ -102,5 +102,5 @@
     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;
@@ -120,5 +120,5 @@
     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");
@@ -192,5 +192,5 @@
         String userName = CredentialsManager.getInstance().getUsername();
         if (isAnonymous()) {
-            if (userName != null && ! userName.trim().equals("")) {
+            if (userName != null && !userName.trim().isEmpty()) {
                 setPartiallyIdentified(userName);
             }
@@ -256,5 +256,5 @@
             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()) {
Index: trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java	(revision 6087)
@@ -604,5 +604,5 @@
             String value = getComponent().getText().trim();
             try {
-                if (value.equals("")) {
+                if (value.isEmpty()) {
                     tileIndex = 0;
                 } else {
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java	(revision 6087)
@@ -462,5 +462,5 @@
                 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: trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolver.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolver.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolver.java	(revision 6087)
@@ -174,7 +174,7 @@
         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())
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheTableCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheTableCellRenderer.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheTableCellRenderer.java	(revision 6087)
@@ -48,5 +48,5 @@
     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));
@@ -69,5 +69,5 @@
     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"));
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanel.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanel.java	(revision 6087)
@@ -184,5 +184,5 @@
         protected void validate() {
             String value = tfUrl.getText();
-            if (value.trim().equals("")) {
+            if (value.trim().isEmpty()) {
                 feedbackNone();
                 return;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 6087)
@@ -1049,5 +1049,5 @@
                             );
 
-                    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)));
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java	(revision 6087)
@@ -340,10 +340,10 @@
             // 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: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(revision 6087)
@@ -1573,5 +1573,5 @@
 
         protected boolean isEmptyRole() {
-            return tfRole.getText() == null || tfRole.getText().trim().equals("");
+            return tfRole.getText() == null || tfRole.getText().trim().isEmpty();
         }
 
Index: trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java	(revision 6087)
@@ -202,5 +202,5 @@
             );
             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: trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java	(revision 6087)
@@ -230,5 +230,5 @@
             tfUserName.setText(username);
             tfPassword.setText(password);
-            cbSaveCredentials.setSelected(!username.equals("") && ! password.equals(""));
+            cbSaveCredentials.setSelected(!username.isEmpty() && !password.isEmpty());
         }
 
Index: trunk/src/org/openstreetmap/josm/gui/io/FilenameCellEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/FilenameCellEditor.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/gui/io/FilenameCellEditor.java	(revision 6087)
@@ -115,5 +115,5 @@
     @Override
     public boolean stopCellEditing() {
-        if (tfFileName.getText() == null || tfFileName.getText().trim().equals("")) {
+        if (tfFileName.getText() == null || tfFileName.getText().trim().isEmpty()) {
             value = null;
         } else {
Index: trunk/src/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java	(revision 6087)
@@ -226,5 +226,5 @@
     @Override
     public boolean stopCellEditing() {
-        if (tfFilename.getText() == null || tfFilename.getText().trim().equals("")) {
+        if (tfFilename.getText() == null || tfFilename.getText().trim().isEmpty()) {
             value = null;
         } else {
Index: trunk/src/org/openstreetmap/josm/gui/io/TagSettingsPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/TagSettingsPanel.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/gui/io/TagSettingsPanel.java	(revision 6087)
@@ -56,5 +56,5 @@
             return;
 
-        if (comment.equals("")) {
+        if (comment.isEmpty()) {
             pnlTagEditor.getModel().delete("comment");
             return;
Index: trunk/src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java	(revision 6087)
@@ -183,5 +183,5 @@
         @Override
         public boolean isValid() {
-            return ! getComponent().getText().trim().equals("");
+            return !getComponent().getText().trim().isEmpty();
         }
 
@@ -203,5 +203,5 @@
         @Override
         public boolean isValid() {
-            return ! getComponent().getText().trim().equals("");
+            return !getComponent().getText().trim().isEmpty();
         }
 
Index: trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java	(revision 6087)
@@ -441,5 +441,5 @@
         public void filter() {
             String expr = tfFilter.getText().trim();
-            if (expr.equals("")) {
+            if (expr.isEmpty()) {
                 expr = null;
             }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 6087)
@@ -1083,8 +1083,8 @@
                         @Override
                         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);
                         }
@@ -1241,5 +1241,5 @@
 
                 while ((line = reader.readLine()) != null && !canceled) {
-                    if (line.trim().equals("")) {
+                    if (line.trim().isEmpty()) {
                         continue; // skip empty lines
                     }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java	(revision 6087)
@@ -45,5 +45,5 @@
     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 {
@@ -58,5 +58,5 @@
     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: trunk/src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java	(revision 6087)
@@ -198,5 +198,5 @@
         protected void updateEnabledState() {
             boolean enabled =
-                !tfOsmServerUrl.getText().trim().equals("")
+                !tfOsmServerUrl.getText().trim().isEmpty()
                 && !tfOsmServerUrl.getText().trim().equals(lastTestedUrl);
             if (enabled) {
@@ -236,5 +236,5 @@
         @Override
         public boolean isValid() {
-            if (getComponent().getText().trim().equals(""))
+            if (getComponent().getText().trim().isEmpty())
                 return false;
 
@@ -249,5 +249,5 @@
         @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: trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java	(revision 6087)
@@ -149,5 +149,5 @@
         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) {
@@ -430,5 +430,5 @@
             // 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;
             }
@@ -476,5 +476,5 @@
         // 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;
 
@@ -517,5 +517,5 @@
         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: trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java	(revision 6087)
@@ -97,5 +97,5 @@
                 return "<b>"+DIFFERENT.replaceAll("<", "&lt;").replaceAll(">", "&gt;")+"</b>";
 
-            if (value.equals(""))
+            if (value.isEmpty())
                 return "&nbsp;";
 
@@ -117,5 +117,5 @@
 
         private Integer parseInteger(String str) {
-            if (str == null || "".equals(str))
+            if (str == null || str.isEmpty())
                 return null;
             try {
Index: trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingTextField.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingTextField.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingTextField.java	(revision 6087)
@@ -150,5 +150,5 @@
                     @Override
                     public void keyReleased(KeyEvent e) {
-                        if (getText().equals("")) {
+                        if (getText().isEmpty()) {
                             applyFilter("");
                         }
Index: trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java	(revision 6087)
@@ -302,5 +302,5 @@
     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;
@@ -316,5 +316,5 @@
 
         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"))
@@ -327,5 +327,5 @@
 
         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"))
@@ -338,5 +338,5 @@
 
         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")) {
@@ -436,5 +436,5 @@
                 return new ChangesetQuery();
             query = query.trim();
-            if (query.equals(""))
+            if (query.isEmpty())
                 return new ChangesetQuery();
             Map<String,String> queryParams  = createMapFromQueryString(query);
Index: trunk/src/org/openstreetmap/josm/io/DefaultProxySelector.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/DefaultProxySelector.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/io/DefaultProxySelector.java	(revision 6087)
@@ -108,5 +108,5 @@
         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 {
@@ -120,5 +120,5 @@
         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 {
Index: trunk/src/org/openstreetmap/josm/io/NmeaReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/NmeaReader.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/io/NmeaReader.java	(revision 6087)
@@ -235,5 +235,5 @@
     private boolean ParseNMEASentence(String s, NMEAParserState ps) {
         try {
-            if (s.equals(""))
+            if (s.isEmpty())
                 throw new NullPointerException();
 
@@ -304,9 +304,9 @@
                     // 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()) { // FIX ? same check
                             currentwp.attr.put("ele", accu);
                         }
@@ -316,5 +316,5 @@
                 accu=e[GPGGA.SATELLITE_COUNT.position];
                 int sat = 0;
-                if(!accu.equals("")) {
+                if(!accu.isEmpty()) {
                     sat = Integer.parseInt(accu);
                     currentwp.attr.put("sat", accu);
@@ -322,10 +322,10 @@
                 // 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) {
@@ -353,5 +353,5 @@
                     // 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);
@@ -362,5 +362,5 @@
                 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
@@ -371,15 +371,15 @@
                 // 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));
                 }
@@ -412,5 +412,5 @@
                 // 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
@@ -419,5 +419,5 @@
                 // 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);
@@ -464,5 +464,5 @@
         // 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
Index: trunk/src/org/openstreetmap/josm/io/OsmApiException.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmApiException.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/io/OsmApiException.java	(revision 6087)
@@ -170,5 +170,5 @@
             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));
Index: trunk/src/org/openstreetmap/josm/io/auth/AbstractCredentialsAgent.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/auth/AbstractCredentialsAgent.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/io/auth/AbstractCredentialsAgent.java	(revision 6087)
@@ -45,5 +45,5 @@
          * (noSuccessWithLastResponse == true).
          */
-        } else if (noSuccessWithLastResponse || username.equals("") || password.equals("")) {
+        } else if (noSuccessWithLastResponse || username.isEmpty() || password.isEmpty()) {
             GuiHelper.runInEDTAndWait(new Runnable() {
                 @Override
Index: trunk/src/org/openstreetmap/josm/io/imagery/WMSGrabber.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/imagery/WMSGrabber.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/io/imagery/WMSGrabber.java	(revision 6087)
@@ -47,5 +47,5 @@
         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());
         }
Index: trunk/src/org/openstreetmap/josm/io/session/GpxTracksSessionImporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/GpxTracksSessionImporter.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/io/session/GpxTracksSessionImporter.java	(revision 6087)
@@ -33,5 +33,5 @@
             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: trunk/src/org/openstreetmap/josm/io/session/MarkerSessionImporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/MarkerSessionImporter.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/io/session/MarkerSessionImporter.java	(revision 6087)
@@ -37,5 +37,5 @@
             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: trunk/src/org/openstreetmap/josm/io/session/OsmDataSessionImporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/OsmDataSessionImporter.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/io/session/OsmDataSessionImporter.java	(revision 6087)
@@ -34,5 +34,5 @@
             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: trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 6087)
@@ -1183,5 +1183,5 @@
             PluginInformation pi = pp.getPluginInformation();
             pl.remove(pi.name);
-            pl.add(pi.name + " (" + (pi.localversion != null && !pi.localversion.equals("")
+            pl.add(pi.name + " (" + (pi.localversion != null && !pi.localversion.isEmpty()
                     ? pi.localversion : "unknown") + ")");
         }
@@ -1198,5 +1198,5 @@
             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));
Index: trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 6087)
@@ -429,5 +429,5 @@
     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();
         }
Index: trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 6087)
@@ -403,5 +403,5 @@
             if (subdir == null) {
                 subdir = "";
-            } else if (!subdir.equals("")) {
+            } else if (!subdir.isEmpty()) {
                 subdir += "/";
             }
Index: trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java	(revision 6086)
+++ trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java	(revision 6087)
@@ -163,5 +163,5 @@
     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();
