Changeset 17481 in osm


Ignore:
Timestamp:
2009-09-06T13:29:17+02:00 (15 years ago)
Author:
stoecker
Message:

close josm bug 3370

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/DuplicateNode.java

    r17479 r17481  
    88import java.util.LinkedList;
    99import java.util.List;
     10import java.util.Map;
    1011
    1112import javax.swing.JOptionPane;
     
    5758            if( duplicated.size() > 1)
    5859            {
    59                 TestError testError = new TestError(this, Severity.ERROR, tr("Duplicated nodes"), DUPLICATE_NODE, duplicated);
    60                 errors.add( testError );
     60                boolean sameTags=true;
     61                Map<String, String> keys0=duplicated.get(0).getKeys();
     62                keys0.remove("created_by");
     63                for(int i=0;i<duplicated.size();i++) {
     64                    Map<String, String> keysI=duplicated.get(i).getKeys();
     65                    keysI.remove("created_by");
     66                    if (!keys0.equals(keysI)) sameTags=false;
     67                }
     68                if (!sameTags) {
     69                    TestError testError = new TestError(this, Severity.WARNING, tr("Nodes at same position"), DUPLICATE_NODE, duplicated);
     70                    errors.add( testError );               
     71                } else {
     72                    TestError testError = new TestError(this, Severity.ERROR, tr("Duplicated nodes"), DUPLICATE_NODE, duplicated);
     73                    errors.add( testError );
     74                }
    6175            }
    6276        }
Note: See TracChangeset for help on using the changeset viewer.