Changeset 17481 in osm for applications
- Timestamp:
- 2009-09-06T13:29:17+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/DuplicateNode.java
r17479 r17481 8 8 import java.util.LinkedList; 9 9 import java.util.List; 10 import java.util.Map; 10 11 11 12 import javax.swing.JOptionPane; … … 57 58 if( duplicated.size() > 1) 58 59 { 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 } 61 75 } 62 76 }
Note:
See TracChangeset
for help on using the changeset viewer.