Ticket #17055: filter_words.patch
| File filter_words.patch, 2.0 KB (added by , 7 years ago) |
|---|
-
TagChecker.java
197 197 BufferedReader reader = cf.getContentReader() 198 198 ) { 199 199 String okValue = null; 200 String okLine = null; 201 boolean bad = false; 200 202 boolean tagcheckerfile = false; 201 203 boolean ignorefile = false; 202 204 boolean isFirstLine = true; … … 203 205 String line; 204 206 while ((line = reader.readLine()) != null && (tagcheckerfile || !line.isEmpty())) { 205 207 if (line.startsWith("#")) { 208 System.out.println(line); 206 209 if (line.startsWith("# JOSM TagChecker")) { 207 210 tagcheckerfile = true; 208 211 if (!DEFAULT_SOURCES.contains(source)) { … … 254 257 } 255 258 } 256 259 } else if (line.charAt(0) == '+') { 260 okLine = line; 257 261 okValue = line.substring(1); 262 bad = false; 258 263 } else if (line.charAt(0) == '-' && okValue != null) { 259 harmonizedKeys.put(harmonizeKey(line.substring(1)), okValue); 264 String hk = harmonizeKey(line.substring(1)); 265 if (!okValue.equals(hk)) { 266 if (!bad) { 267 bad = true; 268 System.out.println(okLine); 269 } 270 if (harmonizedKeys.put(hk, okValue) == null) { 271 System.out.println(line); 272 } 273 274 } 260 275 } else { 261 276 Logging.error(tr("Invalid spellcheck line: {0}", line)); 262 277 }
