Changeset 5700 in josm for trunk/src


Ignore:
Timestamp:
2013-02-08T12:12:23+01:00 (12 years ago)
Author:
stoecker
Message:

remove hardcoded created_by

Location:
trunk/src/org/openstreetmap/josm
Files:
3 edited

Legend:

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

    r5667 r5700  
    3535{
    3636
     37    /**
     38      * Class to store a way reduced to coordinates and keys. Essentially this is used to call the
     39      * <code>equals{}</code> function.
     40      */
    3741    private static class WayPair {
    3842        public List<LatLon> coor;
     
    5761    }
    5862
     63    /**
     64      * Class to store a way reduced to coordinates. Essentially this is used to call the
     65      * <code>equals{}</code> function.
     66      */
    5967    private static class WayPairNoTags {
    6068        public List<LatLon> coor;
     
    7482    }
    7583
     84    /** Test identification for exactly identical ways (coordinates and tags). */
    7685    protected static final int DUPLICATE_WAY = 1401;
     86    /** Test identification for identical ways (coordinates only). */
    7787    protected static final int SAME_WAY = 1402;
    7888
     
    93103                tr("This test checks that there are no ways with same node coordinates and optionally also same tags."));
    94104    }
    95 
    96105
    97106    @Override
     
    145154
    146155    /**
    147      * Remove uninteresting keys, like created_by to normalize the tags
     156     * Remove uninteresting discardable keys to normalize the tags
    148157     * @param wkeys The tags of the way, obtained by {@code Way#getKeys}
    149158     */
    150159    public void removeUninterestingKeys(Map<String, String> wkeys) {
    151         wkeys.remove("created_by");
     160        for(String key : OsmPrimitive.getDiscardableKeys()) {
     161            wkeys.remove(key);
     162        }
    152163    }
    153164
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java

    r5400 r5700  
    253253            cmds.addAll(buildTagChangeCommand(targetPrimitive, allResolutions));
    254254        }
    255         if (targetPrimitive.get("created_by") != null) {
    256             cmds.add(new ChangePropertyCommand(targetPrimitive, "created_by", null));
     255        for(String p : targetPrimitive.getDiscardableKeys()) {
     256            if (targetPrimitive.get(p) != null) {
     257                cmds.add(new ChangePropertyCommand(targetPrimitive, p, null));
     258            }
    257259        }
    258260
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolutionUtil.java

    r3083 r5700  
    3333        // remove irrelevant tags
    3434        //
    35         tc.removeByKey("created_by");
     35        for(String key : OsmPrimitive.getDiscardableKeys()) {
     36            tc.removeByKey(key);
     37        }
    3638
    3739        int numNodesWithTags = 0;
Note: See TracChangeset for help on using the changeset viewer.