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


Ignore:
Timestamp:
2011-08-28T12:43:43+02:00 (13 years ago)
Author:
stoecker
Message:

fix #6069 - patch by simon04 - validator: 'no outer way for multipolygon' does not check incomplete objects

File:
1 edited

Legend:

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

    r4293 r4368  
    136136            polygon.load(r);
    137137
    138             if (polygon.getOuterWays().isEmpty()) {
    139                 errors.add( new TestError(this, Severity.WARNING, tr("No outer way for multipolygon"), MISSING_OUTER_WAY,  r));
     138            boolean hasOuterWay = false;
     139            for (RelationMember m : r.getMembers()) {
     140                if ("outer".equals(m.getRole())) {
     141                    hasOuterWay = true;
     142                    break;
     143                }
     144            }
     145            if (!hasOuterWay) {
     146                errors.add(new TestError(this, Severity.WARNING, tr("No outer way for multipolygon"), MISSING_OUTER_WAY, r));
    140147            }
    141148
Note: See TracChangeset for help on using the changeset viewer.