Index: src/org/openstreetmap/josm/actions/ImageryAdjustAction.java
===================================================================
--- src/org/openstreetmap/josm/actions/ImageryAdjustAction.java	(revision 6084)
+++ src/org/openstreetmap/josm/actions/ImageryAdjustAction.java	(working copy)
@@ -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().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().isEmpty()) {
                 OffsetBookmark.bookmarkOffset(tBookmarkName.getText(), layer);
             }
             Main.main.menu.imageryMenu.refreshOffsetMenu();
Index: src/org/openstreetmap/josm/actions/Map_Rectifier_WMSmenuAction.java
===================================================================
--- src/org/openstreetmap/josm/actions/Map_Rectifier_WMSmenuAction.java	(revision 6084)
+++ src/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,7 +174,7 @@
 
                 // 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: src/org/openstreetmap/josm/actions/search/SearchCompiler.java
===================================================================
--- src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 6084)
+++ src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(working copy)
@@ -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);
Index: src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- src/org/openstreetmap/josm/data/Preferences.java	(revision 6084)
+++ src/org/openstreetmap/josm/data/Preferences.java	(working copy)
@@ -440,7 +440,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;
     }
@@ -773,15 +773,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.isEmpty() ? null : ColorHelper.html2color(colStr);
     }
 
     synchronized public boolean putColor(String colKey, Color val) {
Index: src/org/openstreetmap/josm/data/Version.java
===================================================================
--- src/org/openstreetmap/josm/data/Version.java	(revision 6084)
+++ src/org/openstreetmap/josm/data/Version.java	(working copy)
@@ -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*#.*$")) {
Index: src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java
===================================================================
--- src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java	(revision 6084)
+++ src/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.isEmpty() && !b.isEmpty() && (a.contains(b) || b.contains(a)));
     }
 
     public void add(ImageryInfo info) {
Index: src/org/openstreetmap/josm/data/osm/TagCollection.java
===================================================================
--- src/org/openstreetmap/josm/data/osm/TagCollection.java	(revision 6084)
+++ src/org/openstreetmap/josm/data/osm/TagCollection.java	(working copy)
@@ -601,7 +601,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: src/org/openstreetmap/josm/gui/ExtendedDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 6084)
+++ src/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: src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java
===================================================================
--- src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java	(revision 6084)
+++ src/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 {
@@ -255,7 +255,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: src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java
===================================================================
--- src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java	(revision 6084)
+++ src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java	(working copy)
@@ -603,7 +603,7 @@
         public boolean isValid() {
             String value = getComponent().getText().trim();
             try {
-                if (value.equals("")) {
+                if (value.isEmpty()) {
                     tileIndex = 0;
                 } else {
                     tileIndex = Integer.parseInt(value);
Index: src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java	(revision 6084)
+++ src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java	(working copy)
@@ -461,7 +461,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: src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolver.java
===================================================================
--- src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolver.java	(revision 6084)
+++ src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolver.java	(working copy)
@@ -173,9 +173,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: src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheTableCellRenderer.java
===================================================================
--- src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheTableCellRenderer.java	(revision 6084)
+++ src/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: src/org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanel.java
===================================================================
--- src/org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanel.java	(revision 6084)
+++ src/org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanel.java	(working copy)
@@ -183,7 +183,7 @@
 
         protected void validate() {
             String value = tfUrl.getText();
-            if (value.trim().equals("")) {
+            if (value.trim().isEmpty()) {
                 feedbackNone();
                 return;
             }
Index: src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 6084)
+++ src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(working copy)
@@ -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)));
                     }
Index: src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java
===================================================================
--- src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java	(revision 6084)
+++ src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java	(working copy)
@@ -339,12 +339,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: src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
===================================================================
--- src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(revision 6084)
+++ src/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: src/org/openstreetmap/josm/gui/download/BookmarkSelection.java
===================================================================
--- src/org/openstreetmap/josm/gui/download/BookmarkSelection.java	(revision 6084)
+++ src/org/openstreetmap/josm/gui/download/BookmarkSelection.java	(working copy)
@@ -201,7 +201,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: src/org/openstreetmap/josm/gui/io/CredentialDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/io/CredentialDialog.java	(revision 6084)
+++ src/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() {
Index: src/org/openstreetmap/josm/gui/io/FilenameCellEditor.java
===================================================================
--- src/org/openstreetmap/josm/gui/io/FilenameCellEditor.java	(revision 6084)
+++ src/org/openstreetmap/josm/gui/io/FilenameCellEditor.java	(working copy)
@@ -114,7 +114,7 @@
 
     @Override
     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: src/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java
===================================================================
--- src/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java	(revision 6084)
+++ src/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java	(working copy)
@@ -225,7 +225,7 @@
 
     @Override
     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: src/org/openstreetmap/josm/gui/io/TagSettingsPanel.java
===================================================================
--- src/org/openstreetmap/josm/gui/io/TagSettingsPanel.java	(revision 6084)
+++ src/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;
         }
Index: src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java
===================================================================
--- src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java	(revision 6084)
+++ src/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: src/org/openstreetmap/josm/gui/preferences/PluginPreference.java
===================================================================
--- src/org/openstreetmap/josm/gui/preferences/PluginPreference.java	(revision 6084)
+++ src/org/openstreetmap/josm/gui/preferences/PluginPreference.java	(working copy)
@@ -440,7 +440,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: src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
===================================================================
--- src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 6084)
+++ src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(working copy)
@@ -1082,10 +1082,10 @@
                     new Comparator<String>() {
                         @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);
                         }
                     }
@@ -1240,7 +1240,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: src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java
===================================================================
--- src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java	(revision 6084)
+++ src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java	(working copy)
@@ -44,7 +44,7 @@
 
     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);
@@ -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: src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java
===================================================================
--- src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java	(revision 6084)
+++ src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java	(working copy)
@@ -197,7 +197,7 @@
 
         protected void updateEnabledState() {
             boolean enabled =
-                !tfOsmServerUrl.getText().trim().equals("")
+                !tfOsmServerUrl.getText().trim().isEmpty()
                 && !tfOsmServerUrl.getText().trim().equals(lastTestedUrl);
             if (enabled) {
                 lblValid.setIcon(null);
@@ -235,7 +235,7 @@
 
         @Override
         public boolean isValid() {
-            if (getComponent().getText().trim().equals(""))
+            if (getComponent().getText().trim().isEmpty())
                 return false;
 
             try {
@@ -248,7 +248,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: src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java
===================================================================
--- src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java	(revision 6084)
+++ src/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: src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java
===================================================================
--- src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java	(revision 6084)
+++ src/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.isEmpty())
                 return null;
             try {
                 return Integer.parseInt(str);
Index: src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingTextField.java
===================================================================
--- src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingTextField.java	(revision 6084)
+++ src/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: src/org/openstreetmap/josm/io/ChangesetQuery.java
===================================================================
--- src/org/openstreetmap/josm/io/ChangesetQuery.java	(revision 6084)
+++ src/org/openstreetmap/josm/io/ChangesetQuery.java	(working copy)
@@ -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: src/org/openstreetmap/josm/io/DefaultProxySelector.java
===================================================================
--- src/org/openstreetmap/josm/io/DefaultProxySelector.java	(revision 6084)
+++ src/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: src/org/openstreetmap/josm/io/NmeaReader.java
===================================================================
--- src/org/openstreetmap/josm/io/NmeaReader.java	(revision 6084)
+++ src/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()) { // FIX ? same check
                             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: src/org/openstreetmap/josm/io/OsmApiException.java
===================================================================
--- src/org/openstreetmap/josm/io/OsmApiException.java	(revision 6084)
+++ src/org/openstreetmap/josm/io/OsmApiException.java	(working copy)
@@ -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: src/org/openstreetmap/josm/io/auth/AbstractCredentialsAgent.java
===================================================================
--- src/org/openstreetmap/josm/io/auth/AbstractCredentialsAgent.java	(revision 6084)
+++ src/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: src/org/openstreetmap/josm/io/imagery/WMSGrabber.java
===================================================================
--- src/org/openstreetmap/josm/io/imagery/WMSGrabber.java	(revision 6084)
+++ src/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: src/org/openstreetmap/josm/io/session/GpxTracksSessionImporter.java
===================================================================
--- src/org/openstreetmap/josm/io/session/GpxTracksSessionImporter.java	(revision 6084)
+++ src/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: src/org/openstreetmap/josm/io/session/MarkerSessionImporter.java
===================================================================
--- src/org/openstreetmap/josm/io/session/MarkerSessionImporter.java	(revision 6084)
+++ src/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: src/org/openstreetmap/josm/io/session/OsmDataSessionImporter.java
===================================================================
--- src/org/openstreetmap/josm/io/session/OsmDataSessionImporter.java	(revision 6084)
+++ src/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: src/org/openstreetmap/josm/plugins/PluginHandler.java
===================================================================
--- src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 6084)
+++ src/org/openstreetmap/josm/plugins/PluginHandler.java	(working copy)
@@ -1182,7 +1182,7 @@
         for (final PluginProxy pp : pluginList) {
             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") + ")");
         }
         Collections.sort(pl);
@@ -1197,7 +1197,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")) {
Index: src/org/openstreetmap/josm/tools/ExceptionUtil.java
===================================================================
--- src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 6084)
+++ src/org/openstreetmap/josm/tools/ExceptionUtil.java	(working copy)
@@ -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: src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 6084)
+++ src/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;
Index: src/org/openstreetmap/josm/tools/WindowGeometry.java
===================================================================
--- src/org/openstreetmap/josm/tools/WindowGeometry.java	(revision 6084)
+++ src/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();
