- Timestamp:
- 2021-04-11T13:09:44+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java
r17585 r17746 898 898 * Constructs a new {@code ExactKeyValue}. 899 899 * @param regexp regular expression 900 * @param caseSensitive {@code true} to perform a case-sensitive search 900 901 * @param key key 901 902 * @param value value 902 903 * @throws SearchParseError if a parse error occurs 903 904 */ 904 public ExactKeyValue(boolean regexp, String key, String value) throws SearchParseError {905 public ExactKeyValue(boolean regexp, boolean caseSensitive, String key, String value) throws SearchParseError { 905 906 if ("".equals(key)) 906 907 throw new SearchParseError(tr("Key cannot be empty when tag operator is used. Sample use: key=value")); … … 938 939 939 940 if (regexp && !key.isEmpty() && !"*".equals(key)) { 940 keyPattern = compilePattern(key, regexFlags( false));941 keyPattern = compilePattern(key, regexFlags(caseSensitive)); 941 942 } else { 942 943 keyPattern = null; 943 944 } 944 945 if (regexp && !this.value.isEmpty() && !"*".equals(this.value)) { 945 valuePattern = compilePattern(this.value, regexFlags( false));946 valuePattern = compilePattern(this.value, regexFlags(caseSensitive)); 946 947 } else { 947 948 valuePattern = null; … … 2102 2103 String key = tokenizer.getText(); 2103 2104 if (tokenizer.readIfEqual(Token.EQUALS)) { 2104 return new ExactKeyValue(regexSearch, key, tokenizer.readTextOrNumber());2105 return new ExactKeyValue(regexSearch, caseSensitive, key, tokenizer.readTextOrNumber()); 2105 2106 } else if (tokenizer.readIfEqual(Token.TILDE)) { 2106 return new ExactKeyValue(true, key, tokenizer.readTextOrNumber());2107 return new ExactKeyValue(true, caseSensitive, key, tokenizer.readTextOrNumber()); 2107 2108 } else if (tokenizer.readIfEqual(Token.LESS_THAN)) { 2108 2109 return new ValueComparison(key, tokenizer.readTextOrNumber(), -1);
Note:
See TracChangeset
for help on using the changeset viewer.