Changeset 10380 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2016-06-15T11:31:38+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #12963 - ConcurrentModificationException in PreferencesWriter.write during restart

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/Preferences.java

    r10378 r10380  
    507507     * @throws IOException if any I/O error occurs
    508508     */
    509     public void save() throws IOException {
     509    public synchronized void save() throws IOException {
    510510        save(getPreferenceFile(),
    511511                new FilteredCollection<>(settingsMap.entrySet(), NO_DEFAULT_SETTINGS_ENTRY), false);
    512512    }
    513513
    514     public void saveDefaults() throws IOException {
     514    public synchronized void saveDefaults() throws IOException {
    515515        save(getDefaultsCacheFile(), defaultsMap.entrySet(), true);
    516516    }
    517517
    518     public void save(File prefFile, Collection<Entry<String, Setting<?>>> settings, boolean defaults) throws IOException {
     518    protected void save(File prefFile, Collection<Entry<String, Setting<?>>> settings, boolean defaults) throws IOException {
    519519
    520520        if (!defaults) {
Note: See TracChangeset for help on using the changeset viewer.