Changeset 18649 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2023-02-06T19:39:32+01:00 (15 months ago)
Author:
taylor.smock
Message:

Fix #22712: ignore list doesn't work

This occurred due to OsmValidator#save modifying the list, and expecting
all error codes to be positive.

TestErrorTest now checks one of the tests known to have a negative hashcode.

This also adds some additional JUnit 5 annotations. The additional
annotations are:

  • @LayerManager (cleans up layers after each test run)
    • This is automatically registered for all tests
  • @Projection (sets up the ProjectionRegistry for each test)
File:
1 edited

Legend:

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

    r18637 r18649  
    467467                if (tr("Ignore list").equals(description))
    468468                    description = "";
    469                 if (!key.matches("^[0-9]+(_.*|$)")) {
     469                if (!key.matches("^-?[0-9]+(_.*|$)")) {
    470470                    description = key;
    471471                    key = "";
     
    480480                    // single element
    481481                    entry = key + ":" + item;
    482                 } else if (item.matches("^[0-9]+(_.*|)$")) {
     482                } else if (item.matches("^-?[0-9]+(_.*|)$")) {
    483483                    // no element ids
    484484                    entry = item;
Note: See TracChangeset for help on using the changeset viewer.