Ticket #6254: 6254.patch
| File 6254.patch, 1.1 KB (added by , 15 years ago) |
|---|
-
src/org/openstreetmap/josm/data/osm/TagCollection.java
4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 6 import java.util.ArrayList; 7 import java.util.Arrays; 7 8 import java.util.Collection; 8 9 import java.util.Collections; 9 10 import java.util.HashMap; … … 707 708 * @return the concatenation of all tag values 708 709 */ 709 710 public String getJoinedValues(String key) { 710 StringBuffer buffer = new StringBuffer(); 711 List<String> values = new ArrayList<String>(getValues(key)); 711 StringBuilder buffer = new StringBuilder(); 712 HashSet<String> valSet = new HashSet<String>(); 713 for (String vs : getValues(key)) { 714 valSet.addAll(Arrays.asList(vs.split(";"))); 715 } 716 List<String> values = new ArrayList<String>(valSet); 712 717 values.remove(""); 713 718 Collections.sort(values); 714 719 Iterator<String> iter = values.iterator();
