Index: /trunk/scripts/SyncEditorLayerIndex.java
===================================================================
--- /trunk/scripts/SyncEditorLayerIndex.java	(revision 18207)
+++ /trunk/scripts/SyncEditorLayerIndex.java	(revision 18208)
@@ -64,4 +64,5 @@
 import org.openstreetmap.josm.tools.OptionParser.OptionCount;
 import org.openstreetmap.josm.tools.ReflectionUtils;
+import org.openstreetmap.josm.tools.Utils;
 import org.xml.sax.SAXException;
 
@@ -959,5 +960,5 @@
         Map<String, Set<String>> jh = getNoTileHeader(j);
         if (!Objects.equals(eh, jh)) {
-            if (jh == null || jh.isEmpty()) {
+            if (Utils.isEmpty(jh)) {
                 myprintln("- Missing JOSM no tile headers ("+eh+"): "+getDescription(j));
             } else if (eh != null && !eh.isEmpty()) {
Index: /trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java	(revision 18208)
@@ -47,4 +47,5 @@
 import org.openstreetmap.josm.tools.ImageProvider;
 import org.openstreetmap.josm.tools.Logging;
+import org.openstreetmap.josm.tools.Utils;
 import org.openstreetmap.josm.tools.bugreport.ReportedException;
 
@@ -115,5 +116,5 @@
             case WMS_ENDPOINT:
                 // convert to WMS type
-                if (info.getDefaultLayers() == null || info.getDefaultLayers().isEmpty()) {
+                if (Utils.isEmpty(info.getDefaultLayers())) {
                     return getWMSLayerInfo(info);
                 } else {
@@ -122,5 +123,5 @@
             case WMTS:
                 // specify which layer to use
-                if (info.getDefaultLayers() == null || info.getDefaultLayers().isEmpty()) {
+                if (Utils.isEmpty(info.getDefaultLayers())) {
                     WMTSTileSource tileSource = new WMTSTileSource(info);
                     DefaultLayer layerId = tileSource.userSelectLayer();
@@ -169,5 +170,5 @@
             }
         } catch (IllegalArgumentException | ReportedException ex) {
-            if (ex.getMessage() == null || ex.getMessage().isEmpty() || GraphicsEnvironment.isHeadless()) {
+            if (Utils.isEmpty(ex.getMessage()) || GraphicsEnvironment.isHeadless()) {
                 throw ex;
             } else {
Index: /trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java	(revision 18208)
@@ -50,4 +50,5 @@
 import org.openstreetmap.josm.tools.Shortcut;
 import org.openstreetmap.josm.tools.UserCancelException;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -113,5 +114,5 @@
         // prepare and clean the list of ways to combine
         //
-        if (ways == null || ways.isEmpty())
+        if (Utils.isEmpty(ways))
             return null;
         ways.remove(null); // just in case -  remove all null ways from the collection
Index: /trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java	(revision 18208)
@@ -387,5 +387,5 @@
     protected void updateEnabledState(Collection<? extends OsmPrimitive> selection) {
         DataSet ds = getLayerManager().getEditDataSet();
-        if (ds == null || selection.isEmpty()) {
+        if (ds == null || Utils.isEmpty(selection)) {
             setEnabled(false);
         } else if (update) {
Index: /trunk/src/org/openstreetmap/josm/actions/DownloadReferrersAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/DownloadReferrersAction.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/actions/DownloadReferrersAction.java	(revision 18208)
@@ -15,4 +15,5 @@
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
 import org.openstreetmap.josm.tools.Shortcut;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -44,5 +45,5 @@
      */
     public static void downloadReferrers(OsmDataLayer targetLayer, Collection<OsmPrimitive> children) {
-        if (children == null || children.isEmpty())
+        if (Utils.isEmpty(children))
             return;
         MainApplication.worker.submit(new DownloadReferrersTask(targetLayer, children));
Index: /trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java	(revision 18208)
@@ -261,5 +261,5 @@
         @Override
         protected void realRun() throws SAXException, IOException, OsmTransferException {
-            if (files == null || files.isEmpty()) return;
+            if (Utils.isEmpty(files)) return;
 
             /**
Index: /trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java	(revision 18208)
@@ -28,4 +28,5 @@
 import org.openstreetmap.josm.io.OsmTransferException;
 import org.openstreetmap.josm.tools.Shortcut;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -120,5 +121,5 @@
     @Override
     protected void updateEnabledState(Collection<? extends OsmPrimitive> selection) {
-        if (selection == null || selection.isEmpty()) {
+        if (Utils.isEmpty(selection)) {
             setEnabled(false);
         } else {
Index: /trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java	(revision 18208)
@@ -34,4 +34,5 @@
 import org.openstreetmap.josm.tools.ExceptionUtil;
 import org.openstreetmap.josm.tools.Shortcut;
+import org.openstreetmap.josm.tools.Utils;
 import org.xml.sax.SAXException;
 
@@ -138,5 +139,5 @@
      */
     public void uploadPrimitives(OsmDataLayer layer, Collection<OsmPrimitive> toUpload) {
-        if (toUpload == null || toUpload.isEmpty()) return;
+        if (Utils.isEmpty(toUpload)) return;
         UploadHullBuilder builder = new UploadHullBuilder();
         toUpload = builder.build(toUpload);
Index: /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java	(revision 18208)
@@ -188,5 +188,5 @@
     protected final void extractOsmFilename(DownloadParams settings, String pattern, String url) {
         newLayerName = settings.getLayerName();
-        if (newLayerName == null || newLayerName.isEmpty()) {
+        if (Utils.isEmpty(newLayerName)) {
             Matcher matcher = Pattern.compile(pattern).matcher(url);
             newLayerName = matcher.matches() && matcher.groupCount() > 0 ? Utils.decodeUrl(matcher.group(1)) : null;
Index: /trunk/src/org/openstreetmap/josm/actions/relation/AbstractRelationAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/relation/AbstractRelationAction.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/actions/relation/AbstractRelationAction.java	(revision 18208)
@@ -36,5 +36,5 @@
      */
     protected static final Collection<IRelation<?>> getRelations(Collection<? extends IPrimitive> primitives) {
-        if (primitives == null || primitives.isEmpty()) {
+        if (Utils.isEmpty(primitives)) {
             return Collections.<IRelation<?>>emptySet();
         } else {
Index: /trunk/src/org/openstreetmap/josm/actions/relation/RecentRelationsAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/relation/RecentRelationsAction.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/actions/relation/RecentRelationsAction.java	(revision 18208)
@@ -29,4 +29,5 @@
 import org.openstreetmap.josm.tools.ImageProvider;
 import org.openstreetmap.josm.tools.Shortcut;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -73,5 +74,5 @@
     public static Relation getLastRelation() {
         List<Relation> recentRelations = getRecentRelationsOnActiveLayer();
-        if (recentRelations == null || recentRelations.isEmpty())
+        if (Utils.isEmpty(recentRelations))
             return null;
         return recentRelations.stream().filter(RecentRelationsAction::isRelationListable)
Index: /trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java	(revision 18208)
@@ -26,4 +26,5 @@
 import org.openstreetmap.josm.tools.I18n;
 import org.openstreetmap.josm.tools.ImageProvider;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -139,5 +140,5 @@
                 String newVal = tag.getValue();
 
-                if (newVal == null || newVal.isEmpty()) {
+                if (Utils.isEmpty(newVal)) {
                     if (oldVal != null) {
                         // new value is null and tag exists (will delete tag)
@@ -173,5 +174,5 @@
                     String newVal = tag.getValue();
 
-                    if (newVal == null || newVal.isEmpty()) {
+                    if (Utils.isEmpty(newVal)) {
                         if (oldVal != null)
                             osm.remove(tag.getKey());
@@ -204,5 +205,5 @@
             String msg;
             Map.Entry<String, String> entry = tags.entrySet().iterator().next();
-            if (entry.getValue() == null || entry.getValue().isEmpty()) {
+            if (Utils.isEmpty(entry.getValue())) {
                 switch(OsmPrimitiveType.from(primitive)) {
                 case NODE: msg = marktr("Remove \"{0}\" for node ''{1}''"); break;
@@ -223,5 +224,5 @@
         } else if (objects.size() > 1 && tags.size() == 1) {
             Map.Entry<String, String> entry = tags.entrySet().iterator().next();
-            if (entry.getValue() == null || entry.getValue().isEmpty()) {
+            if (Utils.isEmpty(entry.getValue())) {
                 /* I18n: plural form for objects, but value < 2 not possible! */
                 text = trn("Remove \"{0}\" for {1} object", "Remove \"{0}\" for {1} objects", objects.size(), entry.getKey(), objects.size());
@@ -233,5 +234,5 @@
         } else {
             boolean allNull = this.tags.entrySet().stream()
-                    .allMatch(tag -> tag.getValue() == null || tag.getValue().isEmpty());
+                    .allMatch(tag -> Utils.isEmpty(tag.getValue()));
 
             if (allNull) {
Index: /trunk/src/org/openstreetmap/josm/command/DeleteCommand.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/command/DeleteCommand.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/command/DeleteCommand.java	(revision 18208)
@@ -296,5 +296,5 @@
      */
     public static Command deleteWithReferences(Collection<? extends OsmPrimitive> selection, boolean silent) {
-        if (selection == null || selection.isEmpty()) return null;
+        if (Utils.isEmpty(selection)) return null;
         Set<OsmPrimitive> parents = OsmPrimitive.getReferrer(selection);
         parents.addAll(selection);
@@ -402,5 +402,5 @@
      */
     public static Command delete(Collection<? extends OsmPrimitive> selection, boolean alsoDeleteNodesInWay, boolean silent) {
-        if (selection == null || selection.isEmpty())
+        if (Utils.isEmpty(selection))
             return null;
 
Index: /trunk/src/org/openstreetmap/josm/command/SelectCommand.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/command/SelectCommand.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/command/SelectCommand.java	(revision 18208)
@@ -11,4 +11,5 @@
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -33,5 +34,5 @@
     public SelectCommand(DataSet dataset, Collection<OsmPrimitive> newSelection) {
         super(dataset);
-        if (newSelection == null || newSelection.isEmpty()) {
+        if (Utils.isEmpty(newSelection)) {
             this.newSelection = Collections.emptySet();
         } else if (newSelection.contains(null)) {
Index: /trunk/src/org/openstreetmap/josm/data/DataSource.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/DataSource.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/DataSource.java	(revision 18208)
@@ -10,4 +10,5 @@
 
 import org.openstreetmap.josm.tools.CheckParameterUtil;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -75,5 +76,5 @@
      */
     public static Area getDataSourceArea(Collection<DataSource> dataSources) {
-        if (dataSources == null || dataSources.isEmpty()) {
+        if (Utils.isEmpty(dataSources)) {
             return null;
         }
Index: /trunk/src/org/openstreetmap/josm/data/UserIdentityManager.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/UserIdentityManager.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/UserIdentityManager.java	(revision 18208)
@@ -24,4 +24,5 @@
 import org.openstreetmap.josm.tools.ListenerList;
 import org.openstreetmap.josm.tools.Logging;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -277,14 +278,12 @@
         switch (evt.getKey()) {
         case "osm-server.username":
-            String newUserName = null;
+            String newUserName = "";
             if (evt.getNewValue() instanceof StringSetting) {
                 newUserName = ((StringSetting) evt.getNewValue()).getValue();
             }
-            if (newUserName == null || newUserName.trim().isEmpty()) {
+            if (Utils.isBlank(newUserName)) {
                 setAnonymous();
-            } else {
-                if (!newUserName.equals(userName)) {
-                    setPartiallyIdentified(newUserName);
-                }
+            } else if (!newUserName.equals(userName)) {
+                setPartiallyIdentified(newUserName);
             }
             return;
@@ -294,5 +293,5 @@
                 newUrl = ((StringSetting) evt.getNewValue()).getValue();
             }
-            if (newUrl == null || newUrl.trim().isEmpty()) {
+            if (Utils.isBlank(newUrl)) {
                 setAnonymous();
             } else if (isFullyIdentified()) {
Index: /trunk/src/org/openstreetmap/josm/data/gpx/GpxExtension.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/gpx/GpxExtension.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/gpx/GpxExtension.java	(revision 18208)
@@ -6,4 +6,5 @@
 
 import org.openstreetmap.josm.data.gpx.GpxData.XMLNamespace;
+import org.openstreetmap.josm.tools.Utils;
 import org.xml.sax.Attributes;
 
@@ -174,7 +175,7 @@
         if (parent instanceof GpxExtension) {
             GpxExtension gpx = ((GpxExtension) parent);
-            if ((gpx.getValue() == null || gpx.getValue().trim().isEmpty())
-                    && gpx.getAttributes().isEmpty()
-                    && gpx.getExtensions().isEmpty()) {
+            if (Utils.isBlank(gpx.getValue())
+                    && Utils.isEmpty(gpx.getAttributes())
+                    && Utils.isEmpty(gpx.getExtensions())) {
                 gpx.remove();
             }
@@ -190,5 +191,5 @@
         if (parent != null && parent instanceof GpxExtension) {
             GpxExtension gpx = (GpxExtension) parent;
-            if ((gpx.getValue() == null || gpx.getValue().trim().isEmpty())
+            if (Utils.isBlank(gpx.getValue())
                     && gpx.getAttributes().isEmpty()
                     && !gpx.getExtensions().isVisible()) {
Index: /trunk/src/org/openstreetmap/josm/data/gpx/GpxExtensionCollection.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/gpx/GpxExtensionCollection.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/gpx/GpxExtensionCollection.java	(revision 18208)
@@ -12,4 +12,5 @@
 import org.openstreetmap.josm.io.GpxReader;
 import org.openstreetmap.josm.tools.Logging;
+import org.openstreetmap.josm.tools.Utils;
 import org.xml.sax.Attributes;
 
@@ -66,5 +67,5 @@
      */
     public void closeChild(String qName, String value) {
-        if (childStack == null || childStack.isEmpty()) {
+        if (Utils.isEmpty(childStack)) {
             Logging.warn("Can''t close child ''{0}'', no element in stack.", qName);
             return;
Index: /trunk/src/org/openstreetmap/josm/data/imagery/LayerDetails.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/imagery/LayerDetails.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/imagery/LayerDetails.java	(revision 18208)
@@ -10,4 +10,5 @@
 
 import org.openstreetmap.josm.data.Bounds;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -150,5 +151,5 @@
     @Override
     public String toString() {
-        String baseName = (title == null || title.isEmpty()) ? name : title;
+        String baseName = Utils.isEmpty(title) ? name : title;
         return abstr == null || abstr.equalsIgnoreCase(baseName) ? baseName : baseName + " (" + abstr + ')';
     }
@@ -184,5 +185,5 @@
      */
     public boolean isSelectable() {
-        return !(name == null || name.isEmpty());
+        return !Utils.isEmpty(name);
     }
 
Index: /trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java	(revision 18208)
@@ -536,5 +536,5 @@
     public void setKeys(Map<String, String> keys) {
         Map<String, String> originalKeys = getKeys();
-        if (keys == null || keys.isEmpty()) {
+        if (Utils.isEmpty(keys)) {
             this.keys = null;
             keysChangedImpl(originalKeys);
Index: /trunk/src/org/openstreetmap/josm/data/osm/ChangesetCache.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/ChangesetCache.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/osm/ChangesetCache.java	(revision 18208)
@@ -17,4 +17,5 @@
 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener;
 import org.openstreetmap.josm.tools.SubclassFilteredCollection;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -110,5 +111,5 @@
      */
     public void update(Collection<Changeset> changesets) {
-        if (changesets == null || changesets.isEmpty()) return;
+        if (Utils.isEmpty(changesets)) return;
         DefaultChangesetCacheEvent e = new DefaultChangesetCacheEvent(this);
         for (Changeset cs: changesets) {
Index: /trunk/src/org/openstreetmap/josm/data/osm/DefaultNameFormatter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/DefaultNameFormatter.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/osm/DefaultNameFormatter.java	(revision 18208)
@@ -247,5 +247,5 @@
                     }
                 }
-                if (n == null || n.isEmpty()) {
+                if (Utils.isEmpty(n)) {
                     n = String.valueOf(way.getId());
                 }
Index: /trunk/src/org/openstreetmap/josm/data/osm/NoteData.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/NoteData.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/osm/NoteData.java	(revision 18208)
@@ -19,4 +19,5 @@
 import org.openstreetmap.josm.tools.ListenerList;
 import org.openstreetmap.josm.tools.Logging;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -173,5 +174,5 @@
      */
     public synchronized void createNote(LatLon location, String text) {
-        if (text == null || text.isEmpty()) {
+        if (Utils.isEmpty(text)) {
             throw new IllegalArgumentException("Comment can not be blank when creating a note");
         }
Index: /trunk/src/org/openstreetmap/josm/data/osm/OsmUtils.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/OsmUtils.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/osm/OsmUtils.java	(revision 18208)
@@ -11,4 +11,5 @@
 import org.openstreetmap.josm.tools.CheckParameterUtil;
 import org.openstreetmap.josm.tools.TextTagParser;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -224,5 +225,5 @@
      */
     public static boolean isOsmCollectionEditable(Collection<? extends IPrimitive> collection) {
-        if (collection == null || collection.isEmpty()) {
+        if (Utils.isEmpty(collection)) {
             return false;
         }
Index: /trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java	(revision 18208)
@@ -15,4 +15,5 @@
 import org.openstreetmap.josm.data.coor.QuadTiling;
 import org.openstreetmap.josm.tools.Logging;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -352,5 +353,5 @@
 
         boolean canRemove() {
-            return (content == null || content.isEmpty()) && !this.hasChildren();
+            return Utils.isEmpty(content) && !this.hasChildren();
         }
     }
Index: /trunk/src/org/openstreetmap/josm/data/osm/Relation.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/Relation.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/osm/Relation.java	(revision 18208)
@@ -385,5 +385,5 @@
     public void removeMembersFor(Collection<? extends OsmPrimitive> primitives) {
         checkDatasetNotReadOnly();
-        if (primitives == null || primitives.isEmpty())
+        if (Utils.isEmpty(primitives))
             return;
 
Index: /trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java	(revision 18208)
@@ -23,4 +23,5 @@
 
 import org.openstreetmap.josm.tools.Logging;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -118,5 +119,5 @@
     public static TagCollection commonToAllPrimitives(Collection<? extends Tagged> primitives) {
         TagCollection tags = new TagCollection();
-        if (primitives == null || primitives.isEmpty()) return tags;
+        if (Utils.isEmpty(primitives)) return tags;
         // initialize with the first
         tags.add(TagCollection.from(primitives.iterator().next()));
@@ -565,5 +566,5 @@
         ensureApplicableToPrimitive();
         for (Tag tag: tags.keySet()) {
-            if (tag.getValue() == null || tag.getValue().isEmpty()) {
+            if (Utils.isEmpty(tag.getValue())) {
                 primitive.remove(tag.getKey());
             } else {
Index: /trunk/src/org/openstreetmap/josm/data/osm/Way.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/Way.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/osm/Way.java	(revision 18208)
@@ -54,5 +54,5 @@
             }
 
-            if (nodes == null || nodes.isEmpty()) {
+            if (Utils.isEmpty(nodes)) {
                 this.nodes = EMPTY_NODES;
             } else {
Index: /trunk/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java	(revision 18208)
@@ -54,4 +54,5 @@
 import org.openstreetmap.josm.tools.Logging;
 import org.openstreetmap.josm.tools.UncheckedParseException;
+import org.openstreetmap.josm.tools.Utils;
 import org.openstreetmap.josm.tools.date.DateUtils;
 
@@ -1877,5 +1878,5 @@
         protected Collection<Bounds> getBounds(OsmPrimitive primitive) {
             final Collection<Bounds> bounds = super.getBounds(primitive);
-            return bounds == null || bounds.isEmpty() ?
+            return Utils.isEmpty(bounds) ?
                     Collections.singleton(ProjectionRegistry.getProjection().getWorldBoundsLatLon()) : bounds;
         }
@@ -1896,5 +1897,5 @@
         Preset(String presetName) throws SearchParseError {
 
-            if (presetName == null || presetName.isEmpty()) {
+            if (Utils.isEmpty(presetName)) {
                 throw new SearchParseError("The name of the preset is required");
             }
@@ -2219,5 +2220,5 @@
     public static String buildSearchStringForTag(String key, String value) {
         final String forKey = '"' + escapeStringForSearch(key) + '"' + '=';
-        if (value == null || value.isEmpty()) {
+        if (Utils.isEmpty(value)) {
             return forKey + '*';
         } else {
Index: /trunk/src/org/openstreetmap/josm/data/osm/search/SearchSetting.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/search/SearchSetting.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/osm/search/SearchSetting.java	(revision 18208)
@@ -7,4 +7,5 @@
 
 import org.openstreetmap.josm.tools.Logging;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -172,5 +173,5 @@
      */
     public String writeToString() {
-        if (text == null || text.isEmpty())
+        if (Utils.isEmpty(text))
             return "";
 
Index: /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 18208)
@@ -613,5 +613,5 @@
         TextLabel text = bs.text;
         String s = text.labelCompositionStrategy.compose(n);
-        if (s == null || s.isEmpty()) return;
+        if (Utils.isEmpty(s)) return;
 
         Font defaultFont = g.getFont();
@@ -1145,5 +1145,5 @@
         }
         String name = text.getString(osm);
-        if (name == null || name.isEmpty()) {
+        if (Utils.isEmpty(name)) {
             return;
         }
Index: /trunk/src/org/openstreetmap/josm/data/sources/SourceInfo.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/sources/SourceInfo.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/sources/SourceInfo.java	(revision 18208)
@@ -730,5 +730,5 @@
      */
     public void setNoTileHeaders(MultiMap<String, String> noTileHeaders) {
-       if (noTileHeaders == null || noTileHeaders.isEmpty()) {
+       if (Utils.isEmpty(noTileHeaders)) {
            this.noTileHeaders = null;
        } else {
@@ -750,5 +750,5 @@
      */
     public void setNoTileChecksums(MultiMap<String, String> noTileChecksums) {
-        if (noTileChecksums == null || noTileChecksums.isEmpty()) {
+        if (Utils.isEmpty(noTileChecksums)) {
             this.noTileChecksums = null;
         } else {
@@ -770,5 +770,5 @@
      */
     public void setMetadataHeaders(Map<String, String> metadataHeaders) {
-        if (metadataHeaders == null || metadataHeaders.isEmpty()) {
+        if (Utils.isEmpty(metadataHeaders)) {
             this.metadataHeaders = null;
         } else {
Index: /trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 18208)
@@ -82,4 +82,5 @@
 import org.openstreetmap.josm.tools.Logging;
 import org.openstreetmap.josm.tools.Stopwatch;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -505,5 +506,5 @@
         int i = 0;
         while (i < list.size()) {
-            if (list.get(i) == null || list.get(i).isEmpty()) {
+            if (Utils.isEmpty(list.get(i))) {
                 list.remove(i);
                 continue;
Index: /trunk/src/org/openstreetmap/josm/data/validation/ValidationTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/ValidationTask.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/validation/ValidationTask.java	(revision 18208)
@@ -20,4 +20,5 @@
 import org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor;
 import org.openstreetmap.josm.gui.util.GuiHelper;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -78,5 +79,5 @@
     @Override
     protected void realRun() {
-        if (tests == null || tests.isEmpty())
+        if (Utils.isEmpty(tests))
             return;
         errors = new ArrayList<>();
Index: /trunk/src/org/openstreetmap/josm/data/validation/routines/InetAddressValidator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/routines/InetAddressValidator.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/validation/routines/InetAddressValidator.java	(revision 18208)
@@ -20,4 +20,6 @@
 import java.util.Arrays;
 import java.util.List;
+
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -96,5 +98,5 @@
         // verify that address subgroups are legal
         for (String ipSegment : groups) {
-            if (ipSegment == null || ipSegment.isEmpty()) {
+            if (Utils.isEmpty(ipSegment)) {
                 return false;
             }
Index: /trunk/src/org/openstreetmap/josm/data/validation/routines/RegexValidator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/routines/RegexValidator.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/validation/routines/RegexValidator.java	(revision 18208)
@@ -23,4 +23,6 @@
 import java.util.stream.Collectors;
 import java.util.stream.IntStream;
+
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -126,5 +128,5 @@
         int flags = caseSensitive ? 0 : Pattern.CASE_INSENSITIVE;
         for (int i = 0; i < regexs.length; i++) {
-            if (regexs[i] == null || regexs[i].isEmpty()) {
+            if (Utils.isEmpty(regexs[i])) {
                 throw new IllegalArgumentException("Regular expression[" + i + "] is missing");
             }
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/ConnectivityRelations.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/ConnectivityRelations.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/ConnectivityRelations.java	(revision 18208)
@@ -26,4 +26,5 @@
 import org.openstreetmap.josm.data.validation.TestError;
 import org.openstreetmap.josm.tools.Logging;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -76,5 +77,5 @@
     public static Map<Integer, Map<Integer, Boolean>> parseConnectivityTag(Relation relation) {
         final String cnTag = relation.get(CONNECTIVITY_TAG);
-        if (cnTag == null || cnTag.isEmpty()) {
+        if (Utils.isEmpty(cnTag)) {
             return Collections.emptyMap();
         }
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java	(revision 18208)
@@ -39,4 +39,5 @@
 import org.openstreetmap.josm.tools.Geometry;
 import org.openstreetmap.josm.tools.Geometry.PolygonIntersection;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -440,5 +441,5 @@
         PolygonLevelFinder levelFinder = new PolygonLevelFinder(sharedNodes);
         List<PolygonLevel> list = levelFinder.findOuterWays(allPolygons);
-        if (list == null || list.isEmpty()) {
+        if (Utils.isEmpty(list)) {
             return;
         }
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java	(revision 18208)
@@ -16,8 +16,4 @@
 import javax.swing.JPanel;
 
-import ch.poole.openinghoursparser.OpeningHoursParseException;
-import ch.poole.openinghoursparser.OpeningHoursParser;
-import ch.poole.openinghoursparser.Rule;
-import ch.poole.openinghoursparser.Util;
 import org.openstreetmap.josm.command.ChangePropertyCommand;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -28,4 +24,10 @@
 import org.openstreetmap.josm.data.validation.TestError;
 import org.openstreetmap.josm.tools.GBC;
+import org.openstreetmap.josm.tools.Utils;
+
+import ch.poole.openinghoursparser.OpeningHoursParseException;
+import ch.poole.openinghoursparser.OpeningHoursParser;
+import ch.poole.openinghoursparser.Rule;
+import ch.poole.openinghoursparser.Util;
 
 /**
@@ -93,5 +95,5 @@
      */
     List<TestError> checkOpeningHourSyntax(final String key, final String value, OsmPrimitive p, Locale locale) {
-        if (value == null || value.isEmpty()) {
+        if (Utils.isEmpty(value)) {
             return Collections.emptyList();
         }
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java	(revision 18208)
@@ -333,5 +333,5 @@
                 String templates = allroles.keySet().stream()
                         .map(r -> r.key)
-                        .map(r -> r == null || r.isEmpty() ? tr("<empty>") : r)
+                        .map(r -> Utils.isEmpty(r) ? tr("<empty>") : r)
                         .distinct()
                         .collect(Collectors.joining("/"));
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 18208)
@@ -880,5 +880,5 @@
 
     private void checkSingleTagComplex(MultiMap<OsmPrimitive, String> withErrors, OsmPrimitive p, String key, String value) {
-        if (!checkValues || key == null || value == null || value.isEmpty())
+        if (!checkValues || key == null || Utils.isEmpty(value))
             return;
         if (additionalPresetsValueData != null && !isTagIgnored(key, value)) {
@@ -937,5 +937,5 @@
         // try to fix common typos and check again if value is still unknown
         final String harmonizedValue = harmonizeValue(value);
-        if (harmonizedValue == null || harmonizedValue.isEmpty())
+        if (Utils.isEmpty(harmonizedValue))
             return;
         String fixedValue;
@@ -1219,5 +1219,5 @@
                 String key = prop.getKey();
                 String value = prop.getValue();
-                if (value == null || value.trim().isEmpty()) {
+                if (Utils.isBlank(value)) {
                     commands.add(new ChangePropertyCommand(p, key, null));
                 } else if (value.startsWith(" ") || value.endsWith(" ") || value.contains("  ")) {
Index: /trunk/src/org/openstreetmap/josm/data/vector/VectorNode.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/vector/VectorNode.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/data/vector/VectorNode.java	(revision 18208)
@@ -15,4 +15,5 @@
 import org.openstreetmap.josm.data.osm.visitor.PrimitiveVisitor;
 import org.openstreetmap.josm.data.projection.ProjectionRegistry;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -83,5 +84,5 @@
         // when way is cloned
         List<? extends IPrimitive> referrers = super.getReferrers();
-        if (referrers == null || referrers.isEmpty())
+        if (Utils.isEmpty(referrers))
             return false;
         if (referrers instanceof IPrimitive)
Index: /trunk/src/org/openstreetmap/josm/gui/ImageryMenu.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/ImageryMenu.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/ImageryMenu.java	(revision 18208)
@@ -44,4 +44,5 @@
 import org.openstreetmap.josm.tools.ImageProvider.ImageSizes;
 import org.openstreetmap.josm.tools.Logging;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -151,5 +152,5 @@
     private static boolean isPosInOneShapeIfAny(ImageryInfo info, LatLon pos) {
         List<Shape> shapes = info.getBounds().getShapes();
-        return shapes == null || shapes.isEmpty() || shapes.stream().anyMatch(s -> s.contains(pos));
+        return Utils.isEmpty(shapes) || shapes.stream().anyMatch(s -> s.contains(pos));
     }
 
Index: /trunk/src/org/openstreetmap/josm/gui/PleaseWaitDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/PleaseWaitDialog.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/PleaseWaitDialog.java	(revision 18208)
@@ -26,4 +26,5 @@
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.ImageProvider;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -106,5 +107,5 @@
     @Override
     public void setCustomText(String text) {
-        if (text == null || text.trim().isEmpty()) {
+        if (Utils.isBlank(text)) {
             customText.setVisible(false);
             adjustLayout();
@@ -131,5 +132,5 @@
     @Override
     public void appendLogMessage(String message) {
-        if (message == null || message.trim().isEmpty())
+        if (Utils.isBlank(message))
             return;
         if (!spLog.isVisible()) {
Index: /trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java	(revision 18208)
@@ -51,4 +51,5 @@
 import org.openstreetmap.josm.tools.StreamUtils;
 import org.openstreetmap.josm.tools.UserCancelException;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -637,5 +638,5 @@
         String values = normalizedTags.getValues(key)
                 .stream()
-                .map(x -> (x == null || x.isEmpty()) ? tr("<i>missing</i>") : x)
+                .map(x -> Utils.isEmpty(x) ? tr("<i>missing</i>") : x)
                 .collect(Collectors.joining(tr(", ")));
         return tr("{0} ({1})", key, values);
Index: /trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolver.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolver.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolver.java	(revision 18208)
@@ -195,5 +195,5 @@
         if (tfValue.getText().trim().isEmpty())
             return null;
-        if (primitives == null || primitives.isEmpty())
+        if (Utils.isEmpty(primitives))
             return null;
         return new ChangePropertyCommand(primitives, Utils.removeWhiteSpaces(tfKey.getText()), Utils.removeWhiteSpaces(tfValue.getText()));
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java	(revision 18208)
@@ -664,5 +664,5 @@
             final int sel = tblStyles.getSelectionModel().getLeadSelectionIndex();
             final StyleSource style = sel >= 0 && sel < model.getRowCount() ? model.getRow(sel) : null;
-            if (style == null || style.settings.isEmpty()) {
+            if (style == null || Utils.isEmpty(style.settings)) {
                 setMenu.setEnabled(false);
             } else {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/NotesDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/NotesDialog.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/NotesDialog.java	(revision 18208)
@@ -59,4 +59,5 @@
 import org.openstreetmap.josm.tools.OpenBrowser;
 import org.openstreetmap.josm.tools.Shortcut;
+import org.openstreetmap.josm.tools.Utils;
 import org.openstreetmap.josm.tools.date.DateUtils;
 
@@ -244,5 +245,5 @@
 
     static boolean matchesNote(String filter, Note note) {
-        if (filter == null || filter.isEmpty()) {
+        if (Utils.isEmpty(filter)) {
             return true;
         }
@@ -287,5 +288,5 @@
                     String text = fstComment.getText();
                     String userName = fstComment.getUser().getName();
-                    if (userName == null || userName.isEmpty()) {
+                    if (Utils.isEmpty(userName)) {
                         userName = "<Anonymous>";
                     }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/OsmIdSelectionDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/OsmIdSelectionDialog.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/OsmIdSelectionDialog.java	(revision 18208)
@@ -221,5 +221,5 @@
     protected void tryToPasteFromClipboard(OsmIdTextField tfId, OsmPrimitiveTypesComboBox cbType) {
         String buf = ClipboardUtils.getClipboardStringContent();
-        if (buf == null || buf.isEmpty()) return;
+        if (Utils.isEmpty(buf)) return;
         if (buf.length() > Config.getPref().getInt("downloadprimitive.max-autopaste-length", 2000)) return;
         final List<SimplePrimitiveId> ids = SimplePrimitiveId.fuzzyParse(buf);
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java	(revision 18208)
@@ -308,5 +308,5 @@
      */
     public void selectRelations(Collection<? extends IRelation<?>> relations) {
-        if (relations == null || relations.isEmpty()) {
+        if (Utils.isEmpty(relations)) {
             model.setSelectedRelations(null);
         } else {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java	(revision 18208)
@@ -38,6 +38,6 @@
 import javax.swing.event.PopupMenuEvent;
 
+import org.openstreetmap.josm.actions.AbstractSelectAction;
 import org.openstreetmap.josm.actions.AbstractShowHistoryAction;
-import org.openstreetmap.josm.actions.AbstractSelectAction;
 import org.openstreetmap.josm.actions.AutoScaleAction;
 import org.openstreetmap.josm.actions.AutoScaleAction.AutoScaleMode;
@@ -838,5 +838,5 @@
     protected static class SelectionHistoryPopup extends JPopupMenu {
         public static void launch(Component parent, Collection<Collection<? extends OsmPrimitive>> history) {
-            if (history == null || history.isEmpty()) return;
+            if (Utils.isEmpty(history)) return;
             if (parent.isShowing()) {
                 JPopupMenu menu = new SelectionHistoryPopup(history);
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java	(revision 18208)
@@ -310,5 +310,5 @@
         protected Map<User, Integer> computeStatistics(Collection<? extends OsmPrimitive> primitives) {
             Map<User, Integer> ret = new HashMap<>();
-            if (primitives == null || primitives.isEmpty())
+            if (Utils.isEmpty(primitives))
                 return ret;
             for (OsmPrimitive primitive: primitives) {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorListManagementDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorListManagementDialog.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorListManagementDialog.java	(revision 18208)
@@ -38,4 +38,5 @@
 import org.openstreetmap.josm.tools.ImageProvider;
 import org.openstreetmap.josm.tools.Logging;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -224,5 +225,5 @@
         List<TestError> errors = map.validatorDialog.tree.getErrors();
         ValidateAction validateAction = ValidatorDialog.validateAction;
-        if (!validateAction.isEnabled() || errors == null || errors.isEmpty()) return JOptionPane.NO_OPTION;
+        if (!validateAction.isEnabled() || Utils.isEmpty(errors)) return JOptionPane.NO_OPTION;
         final int answer = ConditionalOptionPaneUtil.showOptionDialog(
                 "rerun_validation_when_ignorelist_changed",
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/AbstractCellRenderer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/AbstractCellRenderer.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/AbstractCellRenderer.java	(revision 18208)
@@ -14,4 +14,5 @@
 
 import org.openstreetmap.josm.data.osm.User;
+import org.openstreetmap.josm.tools.Utils;
 import org.openstreetmap.josm.tools.date.DateUtils;
 
@@ -56,5 +57,5 @@
 
     protected void renderUser(User user) {
-        if (user == null || user.getName().trim().isEmpty()) {
+        if (user == null || Utils.isBlank(user.getName())) {
             setFont(UIManager.getFont("Table.font").deriveFont(Font.ITALIC));
             setText(tr("anonymous"));
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetListModel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetListModel.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetListModel.java	(revision 18208)
@@ -23,4 +23,5 @@
 import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.gui.util.TableHelper;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -95,5 +96,5 @@
      */
     public void initFromChangesetIds(Collection<Integer> ids) {
-        if (ids == null || ids.isEmpty()) {
+        if (Utils.isEmpty(ids)) {
             setChangesets(null);
             return;
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/UidInputFieldValidator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/UidInputFieldValidator.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/UidInputFieldValidator.java	(revision 18208)
@@ -7,4 +7,5 @@
 
 import org.openstreetmap.josm.gui.widgets.AbstractTextComponentValidator;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -39,5 +40,5 @@
     public void validate() {
         String value = getComponent().getText();
-        if (value == null || value.trim().isEmpty()) {
+        if (Utils.isBlank(value)) {
             feedbackInvalid("");
             return;
@@ -62,5 +63,5 @@
     public int getUid() {
         String value = getComponent().getText();
-        if (value == null || value.trim().isEmpty()) return 0;
+        if (Utils.isBlank(value)) return 0;
         try {
             int uid = Integer.parseInt(value.trim());
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/AbstractCopyAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/AbstractCopyAction.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/AbstractCopyAction.java	(revision 18208)
@@ -16,4 +16,5 @@
 import org.openstreetmap.josm.data.osm.Tagged;
 import org.openstreetmap.josm.gui.datatransfer.ClipboardUtils;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -44,5 +45,5 @@
         int[] rows = tagTable.getSelectedRows();
         Collection<? extends Tagged> sel = objectSupplier.get();
-        if (rows.length == 0 || sel == null || sel.isEmpty()) return Stream.empty();
+        if (rows.length == 0 || Utils.isEmpty(sel)) return Stream.empty();
         return Arrays.stream(rows)
                 .mapToObj(keySupplier)
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java	(revision 18208)
@@ -247,5 +247,5 @@
             activeDataSet.beginUpdate();
             sel = OsmDataManager.getInstance().getInProgressSelection();
-            if (sel == null || sel.isEmpty())
+            if (Utils.isEmpty(sel))
                 return;
 
@@ -281,5 +281,5 @@
         changedKey = null;
         sel = OsmDataManager.getInstance().getInProgressSelection();
-        if (sel == null || sel.isEmpty())
+        if (Utils.isEmpty(sel))
             return;
 
@@ -914,5 +914,5 @@
             while (true) {
                 s = JOptionPane.showInputDialog(this, tr("Please enter the number of recently added tags to display"), s);
-                if (s == null || s.isEmpty()) {
+                if (Utils.isEmpty(s)) {
                     return;
                 }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java	(revision 18208)
@@ -51,4 +51,5 @@
 import org.openstreetmap.josm.gui.widgets.OsmPrimitivesTableModel;
 import org.openstreetmap.josm.tools.JosmRuntimeException;
+import org.openstreetmap.josm.tools.Utils;
 import org.openstreetmap.josm.tools.bugreport.BugReport;
 
@@ -417,5 +418,5 @@
 
     private void addMembersAtIndex(List<? extends OsmPrimitive> primitives, int index) {
-        if (primitives == null || primitives.isEmpty())
+        if (Utils.isEmpty(primitives))
             return;
         int idx = index;
@@ -547,5 +548,5 @@
      */
     public void setSelectedMembers(Collection<RelationMember> selectedMembers) {
-        if (selectedMembers == null || selectedMembers.isEmpty()) {
+        if (Utils.isEmpty(selectedMembers)) {
             getSelectionModel().clearSelection();
             return;
@@ -571,5 +572,5 @@
      */
     public void setSelectedMembersIdx(Collection<Integer> selectedIndices) {
-        if (selectedIndices == null || selectedIndices.isEmpty()) {
+        if (Utils.isEmpty(selectedIndices)) {
             getSelectionModel().clearSelection();
             return;
@@ -652,5 +653,5 @@
      */
     public static boolean hasMembersReferringTo(Collection<RelationMember> members, Collection<OsmPrimitive> primitives) {
-        if (primitives == null || primitives.isEmpty())
+        if (Utils.isEmpty(primitives))
             return false;
         Set<OsmPrimitive> referrers = members.stream().map(RelationMember::getMember).collect(Collectors.toSet());
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddFromSelectionAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddFromSelectionAction.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddFromSelectionAction.java	(revision 18208)
@@ -12,4 +12,5 @@
 import org.openstreetmap.josm.gui.dialogs.relation.GenericRelationEditor;
 import org.openstreetmap.josm.gui.dialogs.relation.GenericRelationEditor.AddAbortException;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -30,5 +31,5 @@
 
     protected List<OsmPrimitive> filterConfirmedPrimitives(List<OsmPrimitive> primitives) throws AddAbortException {
-        if (primitives == null || primitives.isEmpty())
+        if (Utils.isEmpty(primitives))
             return primitives;
         List<OsmPrimitive> ret = new ArrayList<>();
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SetRoleAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SetRoleAction.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SetRoleAction.java	(revision 18208)
@@ -45,5 +45,5 @@
 
     protected boolean isEmptyRole() {
-        return tfRole.getText() == null || tfRole.getText().trim().isEmpty();
+        return Utils.isBlank(tfRole.getText());
     }
 
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationNodeMap.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationNodeMap.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationNodeMap.java	(revision 18208)
@@ -15,4 +15,5 @@
 import org.openstreetmap.josm.data.osm.IRelationMember;
 import org.openstreetmap.josm.data.osm.IWay;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -260,5 +261,5 @@
     private static Integer findAdjacentWay(NodesWays nw, INode n) {
         Set<Integer> adj = nw.nodes.get(n);
-        if (adj == null || adj.isEmpty()) return null;
+        if (Utils.isEmpty(adj)) return null;
         return adj.iterator().next();
     }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java	(revision 18208)
@@ -43,4 +43,5 @@
 import org.openstreetmap.josm.tools.Destroyable;
 import org.openstreetmap.josm.tools.ListenerList;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -260,5 +261,5 @@
                     if (groupNode != null) {
                         searchMsg = description;
-                    } else if (description == null || description.isEmpty()) {
+                    } else if (Utils.isEmpty(description)) {
                         searchMsg = message;
                     } else {
Index: /trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java	(revision 18208)
@@ -29,4 +29,5 @@
 import org.openstreetmap.josm.gui.widgets.JosmTextArea;
 import org.openstreetmap.josm.tools.ImageProvider;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -223,5 +224,5 @@
         public void actionPerformed(ActionEvent e) {
             List<Bookmark> sels = bookmarks.getSelectedValuesList();
-            if (sels == null || sels.isEmpty())
+            if (Utils.isEmpty(sels))
                 return;
             for (Object sel: sels) {
Index: /trunk/src/org/openstreetmap/josm/gui/help/HelpUtil.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/help/HelpUtil.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/help/HelpUtil.java	(revision 18208)
@@ -16,4 +16,5 @@
 import org.openstreetmap.josm.tools.LanguageInfo;
 import org.openstreetmap.josm.tools.LanguageInfo.LocaleType;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -149,5 +150,5 @@
     public static String buildAbsoluteHelpTopic(String topic, LocaleType type) {
         String prefix = getHelpTopicPrefix(type);
-        if (prefix == null || topic == null || topic.trim().isEmpty() || "/".equals(topic.trim()))
+        if (prefix == null || Utils.isBlank(topic) || "/".equals(topic.trim()))
             return prefix;
         prefix += '/' + topic;
Index: /trunk/src/org/openstreetmap/josm/gui/io/CustomConfigurator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/CustomConfigurator.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/io/CustomConfigurator.java	(revision 18208)
@@ -149,5 +149,5 @@
      */
     public static void messageBox(String type, String text) {
-        char c = (type == null || type.isEmpty() ? "plain" : type).charAt(0);
+        char c = (Utils.isEmpty(type) ? "plain" : type).charAt(0);
         MainFrame parent = MainApplication.getMainFrame();
         switch (c) {
Index: /trunk/src/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java	(revision 18208)
@@ -30,4 +30,5 @@
 import org.openstreetmap.josm.gui.widgets.JosmTextField;
 import org.openstreetmap.josm.tools.GBC;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -229,5 +230,5 @@
     @Override
     public boolean stopCellEditing() {
-        if (tfFilename.getText() == null || tfFilename.getText().trim().isEmpty()) {
+        if (Utils.isBlank(tfFilename.getText())) {
             value = null;
         } else {
Index: /trunk/src/org/openstreetmap/josm/gui/io/OpenChangesetComboBoxModel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/OpenChangesetComboBoxModel.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/io/OpenChangesetComboBoxModel.java	(revision 18208)
@@ -12,4 +12,5 @@
 import org.openstreetmap.josm.data.osm.ChangesetCacheListener;
 import org.openstreetmap.josm.gui.util.GuiHelper;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -54,5 +55,5 @@
      */
     public void selectFirstChangeset() {
-        if (changesets == null || changesets.isEmpty()) {
+        if (Utils.isEmpty(changesets)) {
             setSelectedItem(null);
         } else {
Index: /trunk/src/org/openstreetmap/josm/gui/layer/NoteLayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/NoteLayer.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/NoteLayer.java	(revision 18208)
@@ -57,4 +57,5 @@
 import org.openstreetmap.josm.tools.ImageProvider;
 import org.openstreetmap.josm.tools.Logging;
+import org.openstreetmap.josm.tools.Utils;
 import org.openstreetmap.josm.tools.date.DateUtils;
 
@@ -314,5 +315,5 @@
                 sb.append("<hr/>");
                 String userName = XmlWriter.encode(comment.getUser().getName());
-                if (userName == null || userName.trim().isEmpty()) {
+                if (Utils.isBlank(userName)) {
                     userName = "&lt;Anonymous&gt;";
                 }
Index: /trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 18208)
@@ -135,4 +135,5 @@
 import org.openstreetmap.josm.tools.Logging;
 import org.openstreetmap.josm.tools.UncheckedParseException;
+import org.openstreetmap.josm.tools.Utils;
 import org.openstreetmap.josm.tools.date.DateUtils;
 
@@ -653,5 +654,5 @@
     public void cleanupAfterUpload(final Collection<? extends IPrimitive> processed) {
         // return immediately if an upload attempt failed
-        if (processed == null || processed.isEmpty())
+        if (Utils.isEmpty(processed))
             return;
 
Index: /trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java	(revision 18208)
@@ -54,4 +54,5 @@
 import org.openstreetmap.josm.tools.ImageProvider;
 import org.openstreetmap.josm.tools.OpenBrowser;
+import org.openstreetmap.josm.tools.Utils;
 import org.openstreetmap.josm.tools.date.Interval;
 
@@ -181,5 +182,5 @@
                 int row = t.rowAtPoint(e.getPoint());
                 String url = (String) t.getValueAt(row, col);
-                if (url == null || url.isEmpty()) {
+                if (Utils.isEmpty(url)) {
                     return;
                 }
Index: /trunk/src/org/openstreetmap/josm/gui/layer/gpx/ConvertFromGpxLayerAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/gpx/ConvertFromGpxLayerAction.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/gpx/ConvertFromGpxLayerAction.java	(revision 18208)
@@ -37,4 +37,5 @@
 import org.openstreetmap.josm.spi.preferences.Config;
 import org.openstreetmap.josm.tools.GBC;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -159,5 +160,5 @@
                 String extpre = "extension:";
                 String pre = ext.getPrefix();
-                if (pre == null || pre.isEmpty()) {
+                if (Utils.isEmpty(pre)) {
                     pre = "other";
                 }
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSRuleIndex.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSRuleIndex.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSRuleIndex.java	(revision 18208)
@@ -157,5 +157,5 @@
                 }
                 final List<Condition> conditions = selRightmost.getConditions();
-                if (conditions == null || conditions.isEmpty()) {
+                if (Utils.isEmpty(conditions)) {
                     remaining.set(ruleIndex);
                     continue;
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java	(revision 18208)
@@ -458,5 +458,5 @@
 
             void execGeometryTests() {
-                if (toCheck == null || toCheck.isEmpty())
+                if (Utils.isEmpty(toCheck))
                     return;
                 for (IPrimitive p : Geometry.filterInsideAnyPolygon(toCheck, e.osm)) {
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 18208)
@@ -759,5 +759,5 @@
 
     private static void prepareFileChooser(String url, AbstractFileChooser fc) {
-        if (url == null || url.trim().isEmpty()) return;
+        if (Utils.isBlank(url)) return;
         URL sourceUrl = null;
         try {
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/TabPreferenceSetting.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/TabPreferenceSetting.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/TabPreferenceSetting.java	(revision 18208)
@@ -7,4 +7,5 @@
 
 import org.openstreetmap.josm.tools.ImageProvider;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -28,5 +29,5 @@
     default ImageIcon getIcon(ImageProvider.ImageSizes size) {
         String iconName = getIconName();
-        return iconName == null || iconName.isEmpty()
+        return Utils.isEmpty(iconName)
                 ? null
                 : iconName.contains("/")
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java	(revision 18208)
@@ -85,4 +85,5 @@
 import org.openstreetmap.josm.tools.Logging;
 import org.openstreetmap.josm.tools.Shortcut;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -1088,7 +1089,6 @@
 
     public static Collection<String> getToolString() {
-
         Collection<String> toolStr = Config.getPref().getList("toolbar", Arrays.asList(deftoolbar));
-        if (toolStr == null || toolStr.isEmpty()) {
+        if (Utils.isEmpty(toolStr)) {
             toolStr = Arrays.asList(deftoolbar);
         }
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java	(revision 18208)
@@ -40,4 +40,5 @@
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.Logging;
+import org.openstreetmap.josm.tools.Utils;
 import org.openstreetmap.josm.tools.template_engine.ParseError;
 import org.openstreetmap.josm.tools.template_engine.TemplateParser;
@@ -143,5 +144,5 @@
         super(new GridBagLayout());
         this.layers = layers;
-        if (layers == null || layers.isEmpty()) {
+        if (Utils.isEmpty(layers)) {
             throw new InvalidArgumentException("At least one layer required");
         }
@@ -262,5 +263,5 @@
      */
     public static void putLayerPrefLocal(GpxData data, String key, String value) {
-        if (value == null || value.trim().isEmpty() ||
+        if (Utils.isBlank(value) ||
                 (getLayerPref(null, key).equals(value) && DEFAULT_PREFS.get(key) != null && DEFAULT_PREFS.get(key).toString().equals(value))) {
             data.getLayerPrefs().remove(key);
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryProvidersPanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryProvidersPanel.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryProvidersPanel.java	(revision 18208)
@@ -73,4 +73,5 @@
 import org.openstreetmap.josm.tools.LanguageInfo;
 import org.openstreetmap.josm.tools.Logging;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -479,5 +480,5 @@
                     activeModel.addRow(p.getImageryInfo());
                 } catch (IllegalArgumentException ex) {
-                    if (ex.getMessage() == null || ex.getMessage().isEmpty())
+                    if (Utils.isEmpty(ex.getMessage()))
                         throw ex;
                     else {
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java	(revision 18208)
@@ -22,4 +22,5 @@
 import org.openstreetmap.josm.gui.widgets.VerticallyScrollablePanel;
 import org.openstreetmap.josm.plugins.PluginInformation;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -63,5 +64,5 @@
     protected static String formatPluginRemoteVersion(PluginInformation pi) {
         StringBuilder sb = new StringBuilder();
-        if (pi.version == null || pi.version.trim().isEmpty()) {
+        if (Utils.isBlank(pi.version)) {
             sb.append(tr("unknown"));
         } else {
@@ -77,5 +78,5 @@
         if (pi == null)
             return tr("unknown");
-        if (pi.localversion == null || pi.localversion.trim().isEmpty())
+        if (Utils.isBlank(pi.localversion))
             return tr("unknown");
         return pi.localversion;
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java	(revision 18208)
@@ -414,5 +414,5 @@
             return roles.roles.stream()
                     .filter(i -> i.memberExpression != null && i.memberExpression.match(osm))
-                    .filter(i -> i.types == null || i.types.isEmpty() || i.types.contains(TaggingPresetType.forPrimitive(osm)))
+                    .filter(i -> Utils.isEmpty(i.types) || i.types.contains(TaggingPresetType.forPrimitive(osm)))
                     .findFirst()
                     .map(i -> i.key)
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetItem.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetItem.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetItem.java	(revision 18208)
@@ -27,4 +27,5 @@
 import org.openstreetmap.josm.tools.ImageProvider;
 import org.openstreetmap.josm.tools.Logging;
+import org.openstreetmap.josm.tools.Utils;
 import org.xml.sax.SAXException;
 
@@ -83,5 +84,5 @@
 
     protected static Set<TaggingPresetType> getType(String types) throws SAXException {
-        if (types == null || types.isEmpty()) {
+        if (Utils.isEmpty(types)) {
             throw new SAXException(tr("Unknown type: {0}", types));
         }
@@ -118,5 +119,5 @@
 
     protected static Integer parseInteger(String str) {
-        if (str == null || str.isEmpty())
+        if (Utils.isEmpty(str))
             return null;
         try {
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetItemGuiSupport.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetItemGuiSupport.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetItemGuiSupport.java	(revision 18208)
@@ -1,4 +1,9 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.tagging.presets;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.function.Supplier;
 
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -7,10 +12,6 @@
 import org.openstreetmap.josm.data.osm.search.SearchCompiler;
 import org.openstreetmap.josm.tools.ListenerList;
+import org.openstreetmap.josm.tools.Utils;
 import org.openstreetmap.josm.tools.template_engine.TemplateEngineDataProvider;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.function.Supplier;
 
 /**
@@ -92,5 +93,5 @@
     /**
      * Get tags with values as currently shown in the dialog.
-     * If exactly one primitive is selected, get all tags of it, then 
+     * If exactly one primitive is selected, get all tags of it, then
      * overwrite with the current values shown in the dialog.
      * Else get only the tags shown in the dialog.
@@ -116,5 +117,5 @@
     public Object getTemplateValue(String key, boolean special) {
         String value = getTagged().get(key);
-        return (value == null || value.isEmpty()) ? null : value;
+        return Utils.isEmpty(value) ? null : value;
     }
 
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/PresetListEntry.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/PresetListEntry.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/PresetListEntry.java	(revision 18208)
@@ -67,9 +67,9 @@
         String shortDescription = getShortDescription(true);
 
-        if (displayValue.isEmpty() && (shortDescription == null || shortDescription.isEmpty()))
+        if (displayValue.isEmpty() && Utils.isEmpty(shortDescription))
             return "&nbsp;";
 
         final StringBuilder res = new StringBuilder("<b>").append(displayValue).append("</b>");
-        if (shortDescription != null) {
+        if (!Utils.isEmpty(shortDescription)) {
             // wrap in table to restrict the text width
             res.append("<div style=\"width:300px; padding:0 0 5px 5px\">")
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/Text.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/Text.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/Text.java	(revision 18208)
@@ -234,5 +234,5 @@
     @Override
     public Collection<String> getValues() {
-        if (default_ == null || default_.isEmpty())
+        if (Utils.isEmpty(default_))
             return Collections.emptyList();
         return Collections.singleton(default_);
@@ -254,7 +254,7 @@
 
     private void setupListeners(AutoCompletingTextField textField, TaggingPresetItemGuiSupport support) {
-        // value_templates don't work well with multiple selected items because, 
-        // as the command queue is currently implemented, we can only save 
-        // the same value to all selected primitives, which is probably not 
+        // value_templates don't work well with multiple selected items because,
+        // as the command queue is currently implemented, we can only save
+        // the same value to all selected primitives, which is probably not
         // what you want.
         if (valueTemplate == null || support.getSelected().size() > 1) { // only fire on normal fields
Index: /trunk/src/org/openstreetmap/josm/gui/widgets/FileChooserManager.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/widgets/FileChooserManager.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/widgets/FileChooserManager.java	(revision 18208)
@@ -19,4 +19,5 @@
 import org.openstreetmap.josm.spi.preferences.Config;
 import org.openstreetmap.josm.tools.PlatformManager;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -98,7 +99,7 @@
     public FileChooserManager(boolean open, String lastDirProperty, String defaultDir) {
         this.open = open;
-        this.lastDirProperty = lastDirProperty == null || lastDirProperty.isEmpty() ? "lastDirectory" : lastDirProperty;
+        this.lastDirProperty = Utils.isEmpty(lastDirProperty) ? "lastDirectory" : lastDirProperty;
         this.curDir = Config.getPref().get(this.lastDirProperty).isEmpty() ?
-                defaultDir == null || defaultDir.isEmpty() ? "." : defaultDir
+                Utils.isEmpty(defaultDir) ? "." : defaultDir
                 : Config.getPref().get(this.lastDirProperty);
     }
Index: /trunk/src/org/openstreetmap/josm/gui/widgets/FilterField.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/widgets/FilterField.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/widgets/FilterField.java	(revision 18208)
@@ -93,5 +93,5 @@
                 final TableRowSorter<? extends TableModel> sorter =
                     (TableRowSorter<? extends TableModel>) table.getRowSorter();
-                if (expr == null || expr.isEmpty()) {
+                if (Utils.isEmpty(expr)) {
                     sorter.setRowFilter(null);
                 } else {
Index: /trunk/src/org/openstreetmap/josm/gui/widgets/OsmIdTextField.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/widgets/OsmIdTextField.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/gui/widgets/OsmIdTextField.java	(revision 18208)
@@ -14,4 +14,5 @@
 import org.openstreetmap.josm.data.osm.SimplePrimitiveId;
 import org.openstreetmap.josm.tools.Logging;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -94,5 +95,5 @@
             String value = getComponent().getText();
             char c;
-            if (value == null || value.trim().isEmpty()) {
+            if (Utils.isBlank(value)) {
                 return false;
             }
Index: /trunk/src/org/openstreetmap/josm/io/AbstractReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/AbstractReader.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/io/AbstractReader.java	(revision 18208)
@@ -427,5 +427,5 @@
 
     protected final void parseTimestamp(PrimitiveData current, String time) {
-        if (time == null || time.isEmpty()) {
+        if (Utils.isEmpty(time)) {
             return;
         }
Index: /trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java	(revision 18208)
@@ -432,5 +432,5 @@
     public static class ChangesetQueryUrlParser {
         protected int parseUid(String value) throws ChangesetQueryUrlException {
-            if (value == null || value.trim().isEmpty())
+            if (Utils.isBlank(value))
                 throw new ChangesetQueryUrlException(
                         tr("Unexpected value for ''{0}'' in changeset query url, got {1}", "uid", value));
@@ -449,5 +449,5 @@
 
         protected boolean parseBoolean(String value, String parameter) throws ChangesetQueryUrlException {
-            if (value == null || value.trim().isEmpty())
+            if (Utils.isBlank(value))
                 throw new ChangesetQueryUrlException(
                         tr("Unexpected value for ''{0}'' in changeset query url, got {1}", parameter, value));
@@ -464,5 +464,5 @@
 
         protected Instant parseDate(String value, String parameter) throws ChangesetQueryUrlException {
-            if (value == null || value.trim().isEmpty())
+            if (Utils.isBlank(value))
                 throw new ChangesetQueryUrlException(
                         tr("Unexpected value for ''{0}'' in changeset query url, got {1}", parameter, value));
@@ -488,5 +488,5 @@
 
         protected Collection<Long> parseLongs(String value) {
-            if (value == null || value.isEmpty()) {
+            if (Utils.isEmpty(value)) {
                 return Collections.<Long>emptySet();
             } else {
Index: /trunk/src/org/openstreetmap/josm/io/OsmApiException.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmApiException.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/io/OsmApiException.java	(revision 18208)
@@ -215,5 +215,5 @@
         String header = Utils.strip(errorHeader);
         String body = Utils.strip(errorBody);
-        if ((header == null || header.isEmpty()) && (body == null || body.isEmpty())) {
+        if (Utils.isEmpty(header) && Utils.isEmpty(body)) {
             sb.append(tr("The server replied an error with code {0}.", responseCode));
         } else {
Index: /trunk/src/org/openstreetmap/josm/io/OsmServerChangesetReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmServerChangesetReader.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/io/OsmServerChangesetReader.java	(revision 18208)
@@ -20,4 +20,5 @@
 import org.openstreetmap.josm.tools.CheckParameterUtil;
 import org.openstreetmap.josm.tools.Logging;
+import org.openstreetmap.josm.tools.Utils;
 import org.openstreetmap.josm.tools.XmlParsingException;
 
@@ -124,5 +125,5 @@
                 monitor.indeterminateSubTask(tr("Downloading changeset {0} ...", id));
                 List<Changeset> changesets = OsmChangesetParser.parse(in, monitor.createSubTaskMonitor(1, true));
-                if (changesets == null || changesets.isEmpty())
+                if (Utils.isEmpty(changesets))
                     return null;
                 result = changesets.get(0);
@@ -173,5 +174,5 @@
                     monitor.indeterminateSubTask(tr("({0}/{1}) Downloading changeset {2}...", i, ids.size(), id));
                     List<Changeset> changesets = OsmChangesetParser.parse(in, monitor.createSubTaskMonitor(1, true));
-                    if (changesets == null || changesets.isEmpty()) {
+                    if (Utils.isEmpty(changesets)) {
                         continue;
                     }
Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java	(revision 18208)
@@ -279,5 +279,5 @@
             for (String key : mandatory) {
                 String value = args.get(key);
-                if (value == null || value.isEmpty()) {
+                if (Utils.isEmpty(value)) {
                     error = true;
                     Logging.warn('\'' + myCommand + "' remote control request must have '" + key + "' parameter");
Index: /trunk/src/org/openstreetmap/josm/io/session/GpxTracksSessionImporter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/session/GpxTracksSessionImporter.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/io/session/GpxTracksSessionImporter.java	(revision 18208)
@@ -20,4 +20,5 @@
 import org.openstreetmap.josm.gui.progress.ProgressMonitor;
 import org.openstreetmap.josm.io.IllegalDataException;
+import org.openstreetmap.josm.tools.Utils;
 import org.w3c.dom.Element;
 
@@ -40,5 +41,5 @@
             XPathExpression fileExp = xpath.compile("file/text()");
             String fileStr = (String) fileExp.evaluate(elem, XPathConstants.STRING);
-            if (fileStr == null || fileStr.isEmpty()) {
+            if (Utils.isEmpty(fileStr)) {
                 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 18207)
+++ /trunk/src/org/openstreetmap/josm/io/session/MarkerSessionImporter.java	(revision 18208)
@@ -21,4 +21,5 @@
 import org.openstreetmap.josm.io.IllegalDataException;
 import org.openstreetmap.josm.io.session.SessionReader.ImportSupport;
+import org.openstreetmap.josm.tools.Utils;
 import org.w3c.dom.Element;
 
@@ -40,5 +41,5 @@
             XPathExpression fileExp = xpath.compile("file/text()");
             String fileStr = (String) fileExp.evaluate(elem, XPathConstants.STRING);
-            if (fileStr == null || fileStr.isEmpty()) {
+            if (Utils.isEmpty(fileStr)) {
                 throw new IllegalDataException(tr("File name expected for layer no. {0}", support.getLayerIndex()));
             }
Index: /trunk/src/org/openstreetmap/josm/io/session/NoteSessionImporter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/session/NoteSessionImporter.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/io/session/NoteSessionImporter.java	(revision 18208)
@@ -19,4 +19,5 @@
 import org.openstreetmap.josm.io.IllegalDataException;
 import org.openstreetmap.josm.io.session.SessionReader.ImportSupport;
+import org.openstreetmap.josm.tools.Utils;
 import org.w3c.dom.Element;
 import org.xml.sax.SAXException;
@@ -39,5 +40,5 @@
             XPathExpression fileExp = xpath.compile("file/text()");
             String fileStr = (String) fileExp.evaluate(elem, XPathConstants.STRING);
-            if (fileStr == null || fileStr.isEmpty()) {
+            if (Utils.isEmpty(fileStr)) {
                 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 18207)
+++ /trunk/src/org/openstreetmap/josm/io/session/OsmDataSessionImporter.java	(revision 18208)
@@ -19,4 +19,5 @@
 import org.openstreetmap.josm.io.IllegalDataException;
 import org.openstreetmap.josm.io.session.SessionReader.ImportSupport;
+import org.openstreetmap.josm.tools.Utils;
 import org.w3c.dom.Element;
 
@@ -61,5 +62,5 @@
             XPathExpression fileExp = xpath.compile("file/text()");
             String fileStr = (String) fileExp.evaluate(elem, XPathConstants.STRING);
-            if (fileStr == null || fileStr.isEmpty()) {
+            if (Utils.isEmpty(fileStr)) {
                 throw new IllegalDataException(tr("File name expected for layer no. {0}", support.getLayerIndex()));
             }
Index: /trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java	(revision 18208)
@@ -204,5 +204,5 @@
     private void handleIOException(final ProgressMonitor monitor, IOException e, String details) {
         final String msg = e.getMessage();
-        if (details == null || details.isEmpty()) {
+        if (Utils.isEmpty(details)) {
             Logging.error(e.getClass().getSimpleName()+": " + msg);
         } else {
Index: /trunk/src/org/openstreetmap/josm/spi/preferences/AbstractPreferences.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/spi/preferences/AbstractPreferences.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/spi/preferences/AbstractPreferences.java	(revision 18208)
@@ -10,4 +10,6 @@
 
 import org.openstreetmap.josm.tools.Logging;
+
+import com.jayway.jsonpath.internal.Utils;
 
 /**
@@ -24,5 +26,5 @@
     @Override
     public boolean put(final String key, String value) {
-        return putSetting(key, value == null || value.isEmpty() ? null : new StringSetting(value));
+        return putSetting(key, Utils.isEmpty(value) ? null : new StringSetting(value));
     }
 
Index: /trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 18208)
@@ -461,5 +461,5 @@
     public static String explainGeneric(Exception e) {
         String msg = e.getMessage();
-        if (msg == null || msg.trim().isEmpty()) {
+        if (Utils.isBlank(msg)) {
             msg = e.toString();
         }
Index: /trunk/src/org/openstreetmap/josm/tools/Mediawiki.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/Mediawiki.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/tools/Mediawiki.java	(revision 18208)
@@ -62,5 +62,5 @@
         for (String page : distinctPages) {
             String normalized = xPath.evaluate("/api/query/normalized/n[@from='" + page + "']/@to", document);
-            if (normalized == null || normalized.isEmpty()) {
+            if (Utils.isEmpty(normalized)) {
                 normalized = page;
             }
Index: /trunk/src/org/openstreetmap/josm/tools/OsmPrimitiveImageProvider.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/OsmPrimitiveImageProvider.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/tools/OsmPrimitiveImageProvider.java	(revision 18208)
@@ -58,5 +58,5 @@
             final Optional<ImageResource> icon = TaggingPresets.getMatchingPresets(primitive).stream()
                     .sorted(Comparator.comparing(p -> (p.iconName != null && p.iconName.contains("multipolygon"))
-                            || p.types == null || p.types.isEmpty() ? Integer.MAX_VALUE : p.types.size()))
+                            || Utils.isEmpty(p.types) ? Integer.MAX_VALUE : p.types.size()))
                     .map(TaggingPreset::getImageResource)
                     .filter(Objects::nonNull)
Index: /trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java	(revision 18208)
@@ -390,5 +390,5 @@
     public File getDefaultCacheDirectory() {
         String p = getSystemEnv("LOCALAPPDATA");
-        if (p == null || p.isEmpty()) {
+        if (Utils.isEmpty(p)) {
             // Fallback for Windows OS earlier than Windows Vista, where the variable is not defined
             p = getSystemEnv("APPDATA");
Index: /trunk/src/org/openstreetmap/josm/tools/Tag2Link.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/Tag2Link.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/tools/Tag2Link.java	(revision 18208)
@@ -35,5 +35,5 @@
 /**
  * Extracts web links from OSM tags.
- * 
+ *
  * The following rules are used:
  * <ul>
@@ -144,5 +144,5 @@
     public static void getLinksForTag(String key, String value, LinkConsumer linkConsumer) {
 
-        if (value == null || value.isEmpty()) {
+        if (Utils.isEmpty(value)) {
             return;
         }
Index: /trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 18207)
+++ /trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 18208)
@@ -709,4 +709,14 @@
 
     /**
+     * Determines if a multimap is null or empty.
+     * @param map map
+     * @return {@code true} if map is null or empty
+     * @since 18208
+     */
+    public static boolean isEmpty(MultiMap<?, ?> map) {
+        return map == null || map.isEmpty();
+    }
+
+    /**
      * Determines if a string is null or empty.
      * @param string string
@@ -716,4 +726,14 @@
     public static boolean isEmpty(String string) {
         return string == null || string.isEmpty();
+    }
+
+    /**
+     * Determines if a string is null or blank.
+     * @param string string
+     * @return {@code true} if string is null or blank
+     * @since 18208
+     */
+    public static boolean isBlank(String string) {
+        return string == null || strip(string).isEmpty();
     }
 
Index: /trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java	(revision 18207)
+++ /trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java	(revision 18208)
@@ -37,4 +37,5 @@
 import org.openstreetmap.josm.tools.Logging;
 import org.openstreetmap.josm.tools.PlatformManager;
+import org.openstreetmap.josm.tools.Utils;
 import org.openstreetmap.josm.tools.date.DateUtils;
 
@@ -122,5 +123,5 @@
         pref.init(false);
         String url = OsmApi.getOsmApi().getServerUrl();
-        if (url == null || url.isEmpty() || isProductionApiUrl(url)) {
+        if (Utils.isEmpty(url) || isProductionApiUrl(url)) {
             Config.getPref().put("osm-server.url", "https://api06.dev.openstreetmap.org/api");
         }
Index: /trunk/test/unit/org/openstreetmap/josm/TestUtils.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/TestUtils.java	(revision 18207)
+++ /trunk/test/unit/org/openstreetmap/josm/TestUtils.java	(revision 18208)
@@ -86,5 +86,5 @@
     public static String getTestDataRoot() {
         String testDataRoot = System.getProperty("josm.test.data");
-        if (testDataRoot == null || testDataRoot.isEmpty()) {
+        if (Utils.isEmpty(testDataRoot)) {
             testDataRoot = "test/data";
             System.out.println("System property josm.test.data is not set, using '" + testDataRoot + "'");
