Changeset 12841 in josm for trunk/src/org/openstreetmap/josm/data/preferences/sources/SourcePrefHelper.java
- Timestamp:
- 2017-09-13T16:30:27+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/preferences/sources/SourcePrefHelper.java
r12825 r12841 58 58 public List<SourceEntry> get() { 59 59 60 Collection<Map<String, String>> src = Main.pref.getListOfStructs(pref, (Collection<Map<String, String>>)null);60 List<Map<String, String>> src = Main.pref.getListOfMaps(pref, null); 61 61 if (src == null) 62 62 return new ArrayList<>(getDefault()); … … 78 78 */ 79 79 public boolean put(Collection<? extends SourceEntry> entries) { 80 Collection<Map<String, String>> setting = serializeList(entries);81 boolean unset = Main.pref.getListOf Structs(pref, (Collection<Map<String, String>>)null) == null;80 List<Map<String, String>> setting = serializeList(entries); 81 boolean unset = Main.pref.getListOfMaps(pref, null) == null; 82 82 if (unset) { 83 83 Collection<Map<String, String>> def = serializeList(getDefault()); … … 85 85 return false; 86 86 } 87 return Main.pref.putListOf Structs(pref, setting);87 return Main.pref.putListOfMaps(pref, setting); 88 88 } 89 89 90 private Collection<Map<String, String>> serializeList(Collection<? extends SourceEntry> entries) {91 Collection<Map<String, String>> setting = new ArrayList<>(entries.size());90 private List<Map<String, String>> serializeList(Collection<? extends SourceEntry> entries) { 91 List<Map<String, String>> setting = new ArrayList<>(entries.size()); 92 92 for (SourceEntry e : entries) { 93 93 setting.add(serialize(e));
Note:
See TracChangeset
for help on using the changeset viewer.