Index: trunk/test/data/regress/14199/emptytag.osm
===================================================================
--- trunk/test/data/regress/14199/emptytag.osm	(revision 11435)
+++ trunk/test/data/regress/14199/emptytag.osm	(revision 11435)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<osm version="0.6" generator="CGImap 0.5.8 (19275 thorn-01.openstreetmap.org)" copyright="OpenStreetMap and contributors" attribution="http://www.openstreetmap.org/copyright" license="http://opendatacommons.org/licenses/odbl/1-0/">
+ <node id="4577848024" visible="true" version="1" changeset="44736411" timestamp="2016-12-28T17:22:56Z" user="Winterstein" uid="5037969" lat="50.3679419" lon="8.6680577"/>
+ <node id="4577848025" visible="true" version="1" changeset="44736411" timestamp="2016-12-28T17:22:56Z" user="Winterstein" uid="5037969" lat="50.3680086" lon="8.6682089"/>
+ <node id="4577848026" visible="true" version="1" changeset="44736411" timestamp="2016-12-28T17:22:56Z" user="Winterstein" uid="5037969" lat="50.3679112" lon="8.6683148"/>
+ <node id="4577848027" visible="true" version="1" changeset="44736411" timestamp="2016-12-28T17:22:56Z" user="Winterstein" uid="5037969" lat="50.3678446" lon="8.6681637"/>
+ <way id="462384126" visible="true" version="1" changeset="44807414" timestamp="2016-12-31T14:19:05Z" user="mueschel" uid="616774">
+  <nd ref="4577848024"/>
+  <nd ref="4577848025"/>
+  <nd ref="4577848026"/>
+  <nd ref="4577848027"/>
+  <nd ref="4577848024"/>
+  <tag k="  " v=""/>
+  <tag k="building" v="yes"/>
+ </way>
+</osm>
Index: trunk/test/unit/org/openstreetmap/josm/io/OsmReaderTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/OsmReaderTest.java	(revision 11435)
+++ trunk/test/unit/org/openstreetmap/josm/io/OsmReaderTest.java	(revision 11435)
@@ -0,0 +1,33 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.io;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.InputStream;
+
+import org.junit.Test;
+import org.openstreetmap.josm.TestUtils;
+import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
+
+/**
+ * Unit tests of {@link OsmReader} class.
+ */
+public class OsmReaderTest {
+
+    /**
+     * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/14199">Bug #14199</a>.
+     * @throws Exception if any error occurs
+     */
+    @Test
+    public void testTicket14199() throws Exception {
+        try (InputStream in = TestUtils.getRegressionDataStream(14199, "emptytag.osm")) {
+            Way w = OsmReader.parseDataSet(in, NullProgressMonitor.INSTANCE).getWays().iterator().next();
+            assertEquals(1, w.getKeys().size());
+            assertNull(w.get("  "));
+            assertTrue(w.isModified());
+        }
+    }
+}
Index: trunk/test/unit/org/openstreetmap/josm/tools/UtilsTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/UtilsTest.java	(revision 11433)
+++ trunk/test/unit/org/openstreetmap/josm/tools/UtilsTest.java	(revision 11435)
@@ -3,4 +3,7 @@
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
@@ -10,5 +13,4 @@
 import java.util.Locale;
 
-import org.junit.Assert;
 import org.junit.Rule;
 import org.junit.Test;
@@ -53,26 +55,42 @@
             "\u3000"; // IDEOGRAPHIC SPACE
         // CHECKSTYLE.ON: SingleSpaceSeparator
-        Assert.assertNull(Utils.strip(null));
-        Assert.assertEquals("", Utils.strip(""));
-        Assert.assertEquals("", Utils.strip(" "));
-        Assert.assertEquals("", Utils.strip("  "));
-        Assert.assertEquals("", Utils.strip("   "));
-        Assert.assertEquals("", Utils.strip(someWhite));
-        Assert.assertEquals("a", Utils.strip("a"));
-        Assert.assertEquals("ab", Utils.strip("ab"));
-        Assert.assertEquals("abc", Utils.strip("abc"));
-        Assert.assertEquals("a", Utils.strip(" a"));
-        Assert.assertEquals("ab", Utils.strip(" ab"));
-        Assert.assertEquals("abc", Utils.strip(" abc"));
-        Assert.assertEquals("a", Utils.strip("a "));
-        Assert.assertEquals("ab", Utils.strip("ab "));
-        Assert.assertEquals("abc", Utils.strip("abc "));
-        Assert.assertEquals("a", Utils.strip(someWhite+"a"+someWhite));
-        Assert.assertEquals("ab", Utils.strip(someWhite+"ab"+someWhite));
-        Assert.assertEquals("abc", Utils.strip(someWhite+"abc"+someWhite));
+        assertNull(Utils.strip(null));
+        assertEquals("", Utils.strip(""));
+        assertEquals("", Utils.strip(" "));
+        assertEquals("", Utils.strip("  "));
+        assertEquals("", Utils.strip("   "));
+        assertEquals("", Utils.strip(someWhite));
+        assertEquals("a", Utils.strip("a"));
+        assertEquals("ab", Utils.strip("ab"));
+        assertEquals("abc", Utils.strip("abc"));
+        assertEquals("a", Utils.strip(" a"));
+        assertEquals("ab", Utils.strip(" ab"));
+        assertEquals("abc", Utils.strip(" abc"));
+        assertEquals("a", Utils.strip("a "));
+        assertEquals("ab", Utils.strip("ab "));
+        assertEquals("abc", Utils.strip("abc "));
+        assertEquals("a", Utils.strip(someWhite+"a"+someWhite));
+        assertEquals("ab", Utils.strip(someWhite+"ab"+someWhite));
+        assertEquals("abc", Utils.strip(someWhite+"abc"+someWhite));
 
         // extended skip
-        Assert.assertEquals("a", Utils.strip("a", "b"));
-        Assert.assertEquals("b", Utils.strip("acbcac", "ac"));
+        assertEquals("a", Utils.strip("a", "b"));
+        assertEquals("b", Utils.strip("acbcac", "ac"));
+    }
+
+    /**
+     * Test of {@link Utils#isStripEmpty} method.
+     */
+    @Test
+    public void testIsStripEmpty() {
+        assertTrue(Utils.isStripEmpty(null));
+        assertTrue(Utils.isStripEmpty(""));
+        assertTrue(Utils.isStripEmpty(" "));
+        assertTrue(Utils.isStripEmpty("  "));
+        assertFalse(Utils.isStripEmpty("a"));
+        assertFalse(Utils.isStripEmpty("foo"));
+        assertFalse(Utils.isStripEmpty(" foo"));
+        assertFalse(Utils.isStripEmpty("foo "));
+        assertFalse(Utils.isStripEmpty(" foo "));
     }
 
@@ -82,11 +100,11 @@
     @Test
     public void testToHexString() {
-        Assert.assertEquals("", Utils.toHexString(null));
-        Assert.assertEquals("", Utils.toHexString(new byte[0]));
-        Assert.assertEquals("01", Utils.toHexString(new byte[]{0x1}));
-        Assert.assertEquals("0102", Utils.toHexString(new byte[]{0x1, 0x2}));
-        Assert.assertEquals("12", Utils.toHexString(new byte[]{0x12}));
-        Assert.assertEquals("127f", Utils.toHexString(new byte[]{0x12, 0x7f}));
-        Assert.assertEquals("fedc", Utils.toHexString(new byte[]{(byte) 0xfe, (byte) 0xdc}));
+        assertEquals("", Utils.toHexString(null));
+        assertEquals("", Utils.toHexString(new byte[0]));
+        assertEquals("01", Utils.toHexString(new byte[]{0x1}));
+        assertEquals("0102", Utils.toHexString(new byte[]{0x1, 0x2}));
+        assertEquals("12", Utils.toHexString(new byte[]{0x12}));
+        assertEquals("127f", Utils.toHexString(new byte[]{0x12, 0x7f}));
+        assertEquals("fedc", Utils.toHexString(new byte[]{(byte) 0xfe, (byte) 0xdc}));
     }
 
