Changeset 19670 in josm
- Timestamp:
- 2026-11-01T20:24:29+01:00 (less than one hour ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/HeadersTable.java
r19519 r19670 5 5 6 6 import java.awt.GridBagLayout; 7 import java.util.LinkedHashMap; 7 8 import java.util.List; 8 9 import java.util.Map; … … 17 18 18 19 import org.openstreetmap.josm.tools.GBC; 20 import org.openstreetmap.josm.tools.Utils; 19 21 20 22 /** … … 112 114 /** 113 115 * Returns headers provided by user. 114 * @return headers provided by user 116 * Rows without a name or without a value are ignored. If several rows use the same name, the last one wins. 117 * @return headers provided by user, in table order 115 118 */ 116 119 public Map<String, String> getHeaders() { 117 return headers.stream().distinct().collect(Collectors.toMap(x -> x[0], x -> x[1])); 120 Map<String, String> result = new LinkedHashMap<>(); 121 for (String[] header : headers) { 122 if (!Utils.isStripEmpty(header[0]) && !Utils.isStripEmpty(header[1])) { 123 result.put(header[0], header[1]); 124 } 125 } 126 return result; 118 127 } 119 128
Note:
See TracChangeset
for help on using the changeset viewer.
