Changeset 18202 in josm for trunk/src/org
- Timestamp:
- 2021-09-08T13:55:01+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java
r18195 r18202 2150 2150 UnaryMatchFactory unaryFactory = unaryMatchFactoryMap.get(key); 2151 2151 if (unaryFactory != null) 2152 return unaryFactory.get(key, parseFactor(), tokenizer).validate();2152 return getValidate(unaryFactory, key, tokenizer); 2153 2153 2154 2154 // key:value form where value is a string (may be OSM key search) … … 2164 2164 UnaryMatchFactory unaryFactory = unaryMatchFactoryMap.get(key); 2165 2165 if (unaryFactory != null) 2166 return unaryFactory.get(key, parseFactor(), null).validate();2166 return getValidate(unaryFactory, key, null); 2167 2167 2168 2168 // match string in any key or value … … 2175 2175 private Match parseFactor(String errorMessage) throws SearchParseError { 2176 2176 return Optional.ofNullable(parseFactor()).orElseThrow(() -> new SearchParseError(errorMessage)); 2177 } 2178 2179 private Match getValidate(UnaryMatchFactory unaryFactory, String key, PushbackTokenizer tokenizer) 2180 throws SearchParseError { 2181 UnaryMatch match = unaryFactory.get(key, parseFactor(), tokenizer); 2182 return match != null ? match.validate() : null; 2177 2183 } 2178 2184
Note:
See TracChangeset
for help on using the changeset viewer.