Changeset 16447 in josm


Ignore:
Timestamp:
2020-05-17T17:24:29+02:00 (3 weeks ago)
Author:
GerdP
Message:

see #19053: remove wrong and previously obsolete method clean3000 and corresponding unit test
We want to be able to ignore groups like "shop inside shop"

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java

    r16443 r16447  
    294294     */
    295295    static void cleanupIgnoredErrors() {
    296         cleanup3000();
    297296        if (ignoredErrors.size() > 1) {
    298297            List<String> toRemove = new ArrayList<>();
     
    316315            ignoredErrors.putAll(tmap);
    317316        }
    318     }
    319 
    320     private static void cleanup3000() {
    321         // see #19053
    322         ignoredErrors.entrySet()
    323                 .removeIf(e -> e.getKey().equals("3000_" + e.getValue()));
    324317    }
    325318
  • trunk/test/unit/org/openstreetmap/josm/data/validation/OsmValidatorTest.java

    r16443 r16447  
    22package org.openstreetmap.josm.data.validation;
    33
    4 import static org.junit.Assert.assertEquals;
    54import static org.junit.Assert.assertFalse;
    65import static org.junit.Assert.assertNotEquals;
    76import static org.junit.Assert.assertTrue;
    8 
    9 import java.util.Collections;
    107
    118import org.junit.Before;
     
    9087
    9188    /**
    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     /**
    10389     * Test that tests are really removed, and that core tests cannot be removed
    10490     */
Note: See TracChangeset for help on using the changeset viewer.