Index: /trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 8460)
+++ /trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 8461)
@@ -651,5 +651,5 @@
             }
 
-            if (regexp && key.length() > 0 && !"*".equals(key)) {
+            if (regexp && !key.isEmpty() && !"*".equals(key)) {
                 try {
                     keyPattern = Pattern.compile(key, regexFlags(false));
@@ -662,5 +662,5 @@
                 keyPattern = null;
             }
-            if (regexp && this.value.length() > 0 && !"*".equals(this.value)) {
+            if (regexp && !this.value.isEmpty() && !"*".equals(this.value)) {
                 try {
                     valuePattern = Pattern.compile(this.value, regexFlags(false));
Index: /trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java	(revision 8460)
+++ /trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java	(revision 8461)
@@ -178,5 +178,5 @@
     public static int askForOption(String text, String opts) {
         Integer answer;
-        if (opts.length()>0) {
+        if (!opts.isEmpty()) {
             String[] options = opts.split(";");
             answer = JOptionPane.showOptionDialog(Main.parent, text, "Question", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, 0);
@@ -189,5 +189,5 @@
     public static String askForText(String text) {
         String s = JOptionPane.showInputDialog(Main.parent, text, tr("Enter text"), JOptionPane.QUESTION_MESSAGE);
-        if (s!=null && (s=s.trim()).length()>0) {
+        if (s!=null && !(s=s.trim()).isEmpty()) {
             return s;
         } else {
@@ -558,5 +558,5 @@
             PreferencesUtils.showPrefs(tmpPref);
 
-            if (id.length()>0) {
+            if (!id.isEmpty()) {
                 try {
                     String fragmentVar = "API.fragments['"+id+"']";
@@ -621,5 +621,5 @@
             String text = evalVars(elem.getAttribute("text"));
             String locText = evalVars(elem.getAttribute(LanguageInfo.getJOSMLocaleCode()+".text"));
-            if (locText!=null && locText.length()>0) text=locText;
+            if (locText!=null && !locText.isEmpty()) text=locText;
 
             String type = evalVars(elem.getAttribute("type"));
@@ -630,5 +630,5 @@
             String text = evalVars(elem.getAttribute("text"));
             String locText = evalVars(elem.getAttribute(LanguageInfo.getJOSMLocaleCode()+".text"));
-            if (locText.length()>0) text=locText;
+            if (!locText.isEmpty()) text=locText;
             String var = elem.getAttribute("var");
             if (var.isEmpty()) var="result";
@@ -640,5 +640,5 @@
                 String opts = evalVars(elem.getAttribute("options"));
                 String locOpts = evalVars(elem.getAttribute(LanguageInfo.getJOSMLocaleCode()+".options"));
-                if (locOpts.length()>0) opts=locOpts;
+                if (!locOpts.isEmpty()) opts=locOpts;
                 setVar(var, String.valueOf(askForOption(text, opts)));
             }
Index: /trunk/src/org/openstreetmap/josm/data/validation/routines/InetAddressValidator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/routines/InetAddressValidator.java	(revision 8460)
+++ /trunk/src/org/openstreetmap/josm/data/validation/routines/InetAddressValidator.java	(revision 8461)
@@ -74,5 +74,5 @@
         for (int i = 0; i <= 3; i++) {
             String ipSegment = groups[i];
-            if (ipSegment == null || ipSegment.length() <= 0) {
+            if (ipSegment == null || ipSegment.isEmpty()) {
                 return false;
             }
Index: /trunk/src/org/openstreetmap/josm/data/validation/routines/UrlValidator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/routines/UrlValidator.java	(revision 8460)
+++ /trunk/src/org/openstreetmap/josm/data/validation/routines/UrlValidator.java	(revision 8461)
@@ -405,5 +405,5 @@
 
         String extra = authorityMatcher.group(PARSE_AUTHORITY_EXTRA);
-        if (extra != null && extra.trim().length() > 0){
+        if (extra != null && !extra.trim().isEmpty()){
             return false;
         }
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java	(revision 8460)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java	(revision 8461)
@@ -301,5 +301,5 @@
                 }));
 
-                if (key.length() > 0) {
+                if (!key.isEmpty()) {
                     String s = marktr("Role {0} unknown in templates {1}");
 
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 8460)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 8461)
@@ -177,5 +177,5 @@
                 boolean isFirstLine = true;
                 String line;
-                while ((line = reader.readLine()) != null && (tagcheckerfile || line.length() != 0)) {
+                while ((line = reader.readLine()) != null && (tagcheckerfile || !line.isEmpty())) {
                     if (line.startsWith("#")) {
                         if (line.startsWith("# JOSM TagChecker")) {
@@ -218,5 +218,5 @@
                         }
                     } else if (tagcheckerfile) {
-                        if (line.length() > 0) {
+                        if (!line.isEmpty()) {
                             CheckerData d = new CheckerData();
                             String err = d.getData(line);
@@ -247,5 +247,5 @@
         }
 
-        if (errorSources.length() > 0)
+        if (!errorSources.isEmpty())
             throw new IOException(tr("Could not access data file(s):\n{0}", errorSources));
     }
@@ -382,5 +382,5 @@
                 withErrors.put(p, "HTML");
             }
-            if (checkValues && key != null && value != null && value.length() > 0 && presetsValueData != null) {
+            if (checkValues && key != null && value != null && !value.isEmpty() && presetsValueData != null) {
                 final Set<String> values = presetsValueData.get(key);
                 final boolean keyInPresets = values != null;
@@ -440,5 +440,5 @@
                 }
             }
-            if (checkFixmes && key != null && value != null && value.length() > 0) {
+            if (checkFixmes && key != null && value != null && !value.isEmpty()) {
                 if ((value.toLowerCase(Locale.ENGLISH).contains("fixme")
                         || value.contains("check and delete")
Index: /trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java	(revision 8460)
+++ /trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java	(revision 8461)
@@ -525,5 +525,5 @@
               .append("</strong>=");
             String value = tags.get(key);
-            while(value.length() != 0) {
+            while (!value.isEmpty()) {
                 sb.append(value.substring(0,Math.min(50, value.length())));
                 if (value.length() > 50) {
Index: /trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 8460)
+++ /trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 8461)
@@ -492,5 +492,5 @@
 
         // Ensure all required variables are available
-        if(rememberSizePref.length() != 0 && defaultWindowGeometry != null) {
+        if (!rememberSizePref.isEmpty() && defaultWindowGeometry != null) {
             if(visible) {
                 initWindowGeometry().applySafe(this);
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java	(revision 8460)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java	(revision 8461)
@@ -1025,5 +1025,5 @@
         @Override
         public boolean isValid() {
-            return getComponent().getText().trim().length() > 0;
+            return !getComponent().getText().trim().isEmpty();
         }
 
Index: /trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java	(revision 8460)
+++ /trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java	(revision 8461)
@@ -305,5 +305,5 @@
 
         protected final void updateEnabledState() {
-            setEnabled(cbSearchExpression.getText().trim().length() > 0);
+            setEnabled(!cbSearchExpression.getText().trim().isEmpty());
         }
 
Index: /trunk/src/org/openstreetmap/josm/gui/layer/NoteLayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/NoteLayer.java	(revision 8460)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/NoteLayer.java	(revision 8461)
@@ -117,5 +117,5 @@
                 String commentText = comment.getText();
                 //closing a note creates an empty comment that we don't want to show
-                if (commentText != null && commentText.trim().length() > 0) {
+                if (commentText != null && !commentText.trim().isEmpty()) {
                     sb.append("<hr/>");
                     String userName = XmlWriter.encode(comment.getUser().getName());
Index: /trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java	(revision 8460)
+++ /trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java	(revision 8461)
@@ -408,5 +408,5 @@
         @Override
         public boolean isValid() {
-            return getComponent().getText().trim().length() > 0;
+            return !getComponent().getText().trim().isEmpty();
         }
 
@@ -429,5 +429,5 @@
         @Override
         public boolean isValid() {
-            return getComponent().getText().trim().length() > 0;
+            return !getComponent().getText().trim().isEmpty();
         }
 
Index: /trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticPropertiesPanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticPropertiesPanel.java	(revision 8460)
+++ /trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticPropertiesPanel.java	(revision 8461)
@@ -82,5 +82,5 @@
         @Override
         public boolean isValid() {
-            return getComponent().getText().trim().length() > 0;
+            return !getComponent().getText().trim().isEmpty();
         }
 
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java	(revision 8460)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java	(revision 8461)
@@ -489,5 +489,5 @@
                     // Get icon
                     String iconName = tps.getIconName();
-                    ImageIcon icon = iconName != null && iconName.length() > 0 ? ImageProvider.get("preferences", iconName) : null;
+                    ImageIcon icon = iconName != null && !iconName.isEmpty() ? ImageProvider.get("preferences", iconName) : null;
                     // See #6985 - Force icons to be 48x48 pixels
                     if (icon != null && (icon.getIconHeight() != 48 || icon.getIconWidth() != 48)) {
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java	(revision 8460)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java	(revision 8461)
@@ -218,5 +218,5 @@
                     skip('=');
                     String paramValue = readTillChar(',',')');
-                    if (paramName.length() > 0 && paramValue.length() > 0) {
+                    if (!paramName.isEmpty() && !paramValue.isEmpty()) {
                         ActionParameter<?> actionParam = actionParams.get(paramName);
                         if (actionParam != null) {
@@ -235,7 +235,7 @@
                     skip('=');
                     String paramValue = readTillChar(',','}');
-                    if ("icon".equals(paramName) && paramValue.length() > 0) {
+                    if ("icon".equals(paramName) && !paramValue.isEmpty()) {
                         result.setIcon(paramValue);
-                    } else if("name".equals(paramName) && paramValue.length() > 0) {
+                    } else if("name".equals(paramName) && !paramValue.isEmpty()) {
                         result.setName(paramValue);
                     }
@@ -289,5 +289,5 @@
                 boolean first = true;
                 String tmp = action.getName();
-                if(tmp.length() != 0) {
+                if (!tmp.isEmpty()) {
                     result.append(first ? "{" : ",");
                     result.append("name=");
@@ -296,5 +296,5 @@
                 }
                 tmp = action.getIcon();
-                if(tmp.length() != 0) {
+                if (!tmp.isEmpty()) {
                     result.append(first ? "{" : ",");
                     result.append("icon=");
@@ -385,5 +385,5 @@
             ActionParameter<Object> param = getParam(paramIndex);
 
-            if (param != null && val.length() > 0) {
+            if (param != null && !val.isEmpty()) {
                 currentAction.getParameters().put(param.getName(), param.readFromString((String)aValue));
             }
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/server/UserNameValidator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/server/UserNameValidator.java	(revision 8460)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/server/UserNameValidator.java	(revision 8461)
@@ -23,5 +23,5 @@
     @Override
     public boolean isValid() {
-        return getComponent().getText().trim().length() > 0;
+        return !getComponent().getText().trim().isEmpty();
     }
 
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java	(revision 8460)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java	(revision 8461)
@@ -104,5 +104,5 @@
                 try {
                     Long.parseLong(str);
-                    if (curText.length() != 0)
+                    if (!curText.isEmpty())
                         Long.parseLong(curText);
                     item = lookupItem(curText, true);
Index: /trunk/src/org/openstreetmap/josm/io/GpxExporter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/GpxExporter.java	(revision 8460)
+++ /trunk/src/org/openstreetmap/josm/io/GpxExporter.java	(revision 8461)
@@ -147,8 +147,8 @@
 
         Main.pref.put("lastAddAuthor", author.isSelected());
-        if (authorName.getText().length() != 0) {
+        if (!authorName.getText().isEmpty()) {
             Main.pref.put("lastAuthorName", authorName.getText());
         }
-        if (copyright.getText().length() != 0) {
+        if (!copyright.getText().isEmpty()) {
             Main.pref.put("lastCopyright", copyright.getText());
         }
@@ -164,15 +164,15 @@
         // add author and copyright details to the gpx data
         if (author.isSelected()) {
-            if (authorName.getText().length() > 0) {
+            if (!authorName.getText().isEmpty()) {
                 gpxData.put(META_AUTHOR_NAME, authorName.getText());
                 gpxData.put(META_COPYRIGHT_AUTHOR, authorName.getText());
             }
-            if (email.getText().length() > 0) {
+            if (!email.getText().isEmpty()) {
                 gpxData.put(META_AUTHOR_EMAIL, email.getText());
             }
-            if (copyright.getText().length() > 0) {
+            if (!copyright.getText().isEmpty()) {
                 gpxData.put(META_COPYRIGHT_LICENSE, copyright.getText());
             }
-            if (copyrightYear.getText().length() > 0) {
+            if (!copyrightYear.getText().isEmpty()) {
                 gpxData.put(META_COPYRIGHT_YEAR, copyrightYear.getText());
             }
@@ -180,10 +180,10 @@
 
         // add the description to the gpx data
-        if (desc.getText().length() > 0) {
+        if (!desc.getText().isEmpty()) {
             gpxData.put(META_DESC, desc.getText());
         }
 
         // add keywords to the gpx data
-        if (keywords.getText().length() > 0) {
+        if (!keywords.getText().isEmpty()) {
             gpxData.put(META_KEYWORDS, keywords.getText());
         }
@@ -271,6 +271,7 @@
                     email.setText("");
                 }
-                boolean isAuthorSet = authorName.getText().length() != 0;
-                GpxExporter.enableCopyright(data, copyright, predefined, copyrightYear, copyrightLabel, copyrightYearLabel, warning, b && isAuthorSet);
+                boolean isAuthorSet = !authorName.getText().isEmpty();
+                GpxExporter.enableCopyright(data, copyright, predefined, copyrightYear, copyrightLabel, copyrightYearLabel, warning,
+                        b && isAuthorSet);
             }
         };
@@ -279,5 +280,5 @@
         KeyAdapter authorNameListener = new KeyAdapter(){
             @Override public void keyReleased(KeyEvent e) {
-                boolean b = authorName.getText().length()!=0 && author.isSelected();
+                boolean b = !authorName.getText().isEmpty() && author.isSelected();
                 GpxExporter.enableCopyright(data, copyright, predefined, copyrightYear, copyrightLabel, copyrightYearLabel, warning, b);
             }
Index: /trunk/src/org/openstreetmap/josm/io/GpxReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/GpxReader.java	(revision 8460)
+++ /trunk/src/org/openstreetmap/josm/io/GpxReader.java	(revision 8461)
@@ -364,5 +364,5 @@
                     break;
                 case "link":
-                    if (currentLink.uri == null && accumulator != null && accumulator.toString().length() != 0) {
+                    if (currentLink.uri == null && accumulator != null && !accumulator.toString().isEmpty()) {
                         currentLink = new GpxLink(accumulator.toString());
                     }
Index: /trunk/src/org/openstreetmap/josm/io/GpxWriter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/GpxWriter.java	(revision 8460)
+++ /trunk/src/org/openstreetmap/josm/io/GpxWriter.java	(revision 8461)
@@ -250,5 +250,5 @@
      */
     private void simpleTag(String tag, String content) {
-        if (content != null && content.length() > 0) {
+        if (content != null && !content.isEmpty()) {
             open(tag);
             out.print(encode(content));
Index: /trunk/src/org/openstreetmap/josm/io/OsmReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmReader.java	(revision 8460)
+++ /trunk/src/org/openstreetmap/josm/io/OsmReader.java	(revision 8461)
@@ -436,5 +436,5 @@
 
         String time = parser.getAttributeValue(null, "timestamp");
-        if (time != null && time.length() != 0) {
+        if (time != null && !time.isEmpty()) {
             current.setTimestamp(DateUtils.fromString(time));
         }
Index: /trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java	(revision 8460)
+++ /trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java	(revision 8461)
@@ -147,5 +147,5 @@
         String pl = Utils.join(",", Main.pref.getCollection("plugins"));
         String printsite = site.replaceAll("%<(.*)>", "");
-        if (pl != null && pl.length() != 0) {
+        if (pl != null && !pl.isEmpty()) {
             site = site.replaceAll("%<(.*)>", "$1"+pl);
         } else {
Index: /trunk/src/org/openstreetmap/josm/tools/ColorHelper.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/ColorHelper.java	(revision 8460)
+++ /trunk/src/org/openstreetmap/josm/tools/ColorHelper.java	(revision 8461)
@@ -20,5 +20,5 @@
      */
     public static Color html2color(String html) {
-        if (html.length() > 0 && html.charAt(0) == '#')
+        if (!html.isEmpty() && html.charAt(0) == '#')
             html = html.substring(1);
         if (html.length() == 3) {
Index: /trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java	(revision 8460)
+++ /trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java	(revision 8461)
@@ -292,5 +292,5 @@
         }
         result += name;
-        if (sc != null && sc.getKeyText().length() != 0) {
+        if (sc != null && !sc.getKeyText().isEmpty()) {
             result += " ";
             if (canHtml) {
Index: /trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java	(revision 8460)
+++ /trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java	(revision 8461)
@@ -147,5 +147,5 @@
         result += "<html>";
         result += name;
-        if (sc != null && sc.getKeyText().length() != 0) {
+        if (sc != null && !sc.getKeyText().isEmpty()) {
             result += " ";
             result += "<font size='-2'>";
Index: /trunk/src/org/openstreetmap/josm/tools/TextTagParser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/TextTagParser.java	(revision 8460)
+++ /trunk/src/org/openstreetmap/josm/tools/TextTagParser.java	(revision 8461)
@@ -85,5 +85,5 @@
                     esc = true;
                 } else if (c == '\"' && !quotesStarted) { // opening "
-                    if (s.toString().trim().length()>0) { // we had   ||some text"||
+                    if (!s.toString().trim().isEmpty()) { // we had   ||some text"||
                         s.append(c); // just add ", not open
                     } else {
