Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/OsmUtils.java
r15950 r15951 83 83 */ 84 84 public static boolean isReversed(String value) { 85 if (value == null) { 86 return false; 87 } 85 88 switch (value) { 86 89 case "reverse": … … 98 101 */ 99 102 public static boolean isTrue(String value) { 103 if (value == null) { 104 return false; 105 } 100 106 switch (value) { 101 107 case "true": … … 115 121 */ 116 122 public static boolean isFalse(String value) { 123 if (value == null) { 124 return false; 125 } 117 126 switch (value) { 118 127 case "false": -
trunk/test/unit/org/openstreetmap/josm/data/osm/OsmUtilsTest.java
r15950 r15951 75 75 @Test 76 76 public void testTrueFalse() { 77 assertFalse(OsmUtils.isTrue(null)); 78 assertFalse(OsmUtils.isFalse(null)); 79 assertNull(OsmUtils.getOsmBoolean(null)); 77 80 assertTrue(OsmUtils.isTrue("yes")); 78 81 assertFalse(OsmUtils.isFalse("yes"));
Note:
See TracChangeset
for help on using the changeset viewer.