Changeset 17541 in josm for trunk/src/org
- Timestamp:
- 2021-02-24T22:44:13+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Preferences.java
r16622 r17541 518 518 * @throws IOException if any I/O error occurs 519 519 */ 520 public void fromXML(Reader in) throws XMLStreamException, IOException {520 public synchronized void fromXML(Reader in) throws XMLStreamException, IOException { 521 521 PreferencesReader reader = new PreferencesReader(in, false); 522 522 reader.parse(); … … 529 529 * @param reset if {@code true}, current settings file is replaced by the default one 530 530 */ 531 public void init(boolean reset) {531 public synchronized void init(boolean reset) { 532 532 initSuccessful = false; 533 533 // get the preferences. … … 671 671 * Reset all values stored in this map to the default values. This clears the preferences. 672 672 */ 673 public final void resetToDefault() {673 public final synchronized void resetToDefault() { 674 674 settingsMap.clear(); 675 675 } … … 683 683 */ 684 684 @Override 685 public boolean putSetting(final String key, Setting<?> setting) {685 public synchronized boolean putSetting(final String key, Setting<?> setting) { 686 686 CheckParameterUtil.ensureParameterNotNull(key); 687 687 if (setting != null && setting.getValue() == null) … … 816 816 * @return XML 817 817 */ 818 public String toXML(boolean nopass) {818 public synchronized String toXML(boolean nopass) { 819 819 return toXML(settingsMap.entrySet(), nopass, false); 820 820 }
Note:
See TracChangeset
for help on using the changeset viewer.