Changeset 3673 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2010-11-25T13:01:58+01:00 (14 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/validation/tests
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java
r3671 r3673 81 81 for (int i=1; i<nodes.size(); i++) { 82 82 Node n = nodes.get(i); 83 result.lineTo((float )n.getCoor().lat(), (float) n.getCoor().lon());83 result.lineTo((float) n.getCoor().lat(), (float) n.getCoor().lon()); 84 84 } 85 85 return result; -
trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java
r3671 r3673 135 135 done.add(r.key); 136 136 String keyname = r.key; 137 if ( keyname == "") { //FIXME137 if ("".equals(keyname)) { 138 138 keyname = tr("<empty>"); 139 139 } … … 144 144 if (count == 0) { 145 145 String s = marktr("Role {0} missing"); 146 errors.add( 147 tr(s, keyname), MessageFormat.format(s, keyname), ROLE_MISSING, n) 146 errors.add(new TestError(this, Severity.WARNING, tr("Role verification problem"), 147 tr(s, keyname), MessageFormat.format(s, keyname), ROLE_MISSING, n)); 148 148 } 149 149 else if (vc > count) { 150 150 String s = marktr("Number of {0} roles too low ({1})"); 151 errors.add( 152 tr(s, keyname, count), MessageFormat.format(s, keyname, count), LOW_COUNT, n) 151 errors.add(new TestError(this, Severity.WARNING, tr("Role verification problem"), 152 tr(s, keyname, count), MessageFormat.format(s, keyname, count), LOW_COUNT, n)); 153 153 } else { 154 154 String s = marktr("Number of {0} roles too high ({1})"); 155 errors.add( 156 tr(s, keyname, count), MessageFormat.format(s, keyname, count), HIGH_COUNT, n) 155 errors.add(new TestError(this, Severity.WARNING, tr("Role verification problem"), 156 tr(s, keyname, count), MessageFormat.format(s, keyname, count), HIGH_COUNT, n)); 157 157 } 158 158 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
r3671 r3673 836 836 public boolean valueAll = false; 837 837 public boolean valueBool = false; 838 838 839 private Pattern getPattern(String str) throws IllegalStateException, PatternSyntaxException { 839 840 if (str.endsWith("/i")) … … 850 851 String n = m.group(1).trim(); 851 852 852 // FIXME FIXME: indentation and { } pairs don't match, probably coding error 853 854 if(n.equals("*")) 853 if(n.equals("*")) { 855 854 tagAll = true; 856 else855 } else { 857 856 tag = n.startsWith("/") ? getPattern(n) : n; 858 857 noMatch = m.group(2).equals("!="); 859 858 n = m.group(3).trim(); 860 if (n.equals("*"))859 if (n.equals("*")) { 861 860 valueAll = true; 862 else if(n.equals("BOOLEAN_TRUE")) 863 { 861 } else if (n.equals("BOOLEAN_TRUE")) { 864 862 valueBool = true; 865 863 value = OsmUtils.trueval; 866 } 867 else if(n.equals("BOOLEAN_FALSE")) 868 { 864 } else if (n.equals("BOOLEAN_FALSE")) { 869 865 valueBool = true; 870 866 value = OsmUtils.falseval; 871 } 872 else 867 } else { 873 868 value = n.startsWith("/") ? getPattern(n) : n; 869 } 870 } 874 871 } 875 872 -
trunk/src/org/openstreetmap/josm/data/validation/tests/TurnrestrictionTest.java
r3671 r3673 136 136 errors.add(new TestError(this, Severity.ERROR, 137 137 tr("The \"to\" way does not start or end at a \"via\" node"), TO_VIA_NODE, r)); 138 //FIXME: return; ?138 return; 139 139 } 140 140 } else { -
trunk/src/org/openstreetmap/josm/data/validation/tests/WronglyOrderedWays.java
r3671 r3673 83 83 * 84 84 */ 85 if (w.getNode(0) == w.getNode(w.getNodesCount()-1)) {85 if (w.getNode(0) == w.getNode(w.getNodesCount()-1)) { 86 86 double area2 = 0; 87 87
Note:
See TracChangeset
for help on using the changeset viewer.