Changeset 16471 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2020-05-21T00:29:28+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java
r16436 r16471 12 12 import java.awt.event.MouseEvent; 13 13 import java.util.Collection; 14 import java.util.Collections; 14 15 import java.util.HashMap; 15 16 import java.util.HashSet; … … 264 265 if (args.containsKey("addtags")) { 265 266 GuiHelper.executeByMainWorkerInEDT(() -> { 266 addTags(parseUrlTagsToKeyValues(args.get("addtags")), sender, primitives); 267 String[][] tags = parseUrlTagsToKeyValues(args.get("addtags")) 268 .entrySet().stream() 269 .map(e -> new String[]{e.getKey(), e.getValue()}) 270 .toArray(String[][]::new); 271 addTags(tags, sender, primitives); 267 272 }); 268 273 } … … 276 281 */ 277 282 public static Map<String, String> parseUrlTagsToKeyValues(String urlSection) { 278 return TextTagParser.readTagsByRegexp(urlSection, "\\|", "(.*?)=(.*?)", false); 283 Map<String, String> tags = TextTagParser.readTagsByRegexp(urlSection, "\\|", "(.*?)=(.*?)", false); 284 return tags == null ? Collections.emptyMap() : tags; 279 285 } 280 286
Note:
See TracChangeset
for help on using the changeset viewer.