Changeset 16443 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
r16296 r16443 19 19 import java.util.Enumeration; 20 20 import java.util.HashMap; 21 import java.util.HashSet;22 21 import java.util.Iterator; 23 22 import java.util.List; 24 23 import java.util.Map; 25 24 import java.util.Map.Entry; 26 import java.util.Set;27 25 import java.util.SortedMap; 28 26 import java.util.TreeMap; … … 322 320 private static void cleanup3000() { 323 321 // see #19053 324 Set<String> toRemove = new HashSet<>();325 for (Entry<String, String> entry : ignoredErrors.entrySet()) {326 if (entry.getKey().equals("3000_" + entry.getValue()))327 toRemove.add(entry.getValue());328 }329 322 ignoredErrors.entrySet() 330 .removeIf(e -> toRemove.contains(e.getValue()) && !e.getKey().equals("3000_" + e.getValue())); 331 323 .removeIf(e -> e.getKey().equals("3000_" + e.getValue())); 332 324 } 333 325 -
trunk/test/unit/org/openstreetmap/josm/data/validation/OsmValidatorTest.java
r16182 r16443 2 2 package org.openstreetmap.josm.data.validation; 3 3 4 import static org.junit.Assert.assertEquals; 4 5 import static org.junit.Assert.assertFalse; 5 6 import static org.junit.Assert.assertNotEquals; 6 7 import static org.junit.Assert.assertTrue; 8 9 import java.util.Collections; 7 10 8 11 import org.junit.Before; … … 87 90 88 91 /** 92 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/19053">Bug #19053</a>. 93 * {@link OsmValidator#cleanupIgnoredErrors()} must not combine primitives. 94 */ 95 @Test 96 public void testCleanupIgnoredErrorsTicket19053() { 97 OsmValidator.addIgnoredError("3000_missing tag", "missing tag"); 98 OsmValidator.cleanupIgnoredErrors(); 99 assertEquals(Collections.emptyMap(), OsmValidator.getIgnoredErrors()); 100 } 101 102 /** 89 103 * Test that tests are really removed, and that core tests cannot be removed 90 104 */
Note:
See TracChangeset
for help on using the changeset viewer.