Changeset 15099 in josm


Ignore:
Timestamp:
2019-05-20T01:27:46+02:00 (5 months ago)
Author:
Don-vip
Message:

fix ConcurrentModificationException

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/preferences/sources/SourcePrefHelper.java

    r12846 r15099  
    99import java.util.Map;
    1010import java.util.Set;
     11import java.util.stream.Collectors;
    1112
    1213import org.openstreetmap.josm.spi.preferences.Config;
     
    8990
    9091    private List<Map<String, String>> serializeList(Collection<? extends SourceEntry> entries) {
    91         List<Map<String, String>> setting = new ArrayList<>(entries.size());
    92         for (SourceEntry e : entries) {
    93             setting.add(serialize(e));
    94         }
    95         return setting;
     92        return new ArrayList<>(entries).stream().map(this::serialize).collect(Collectors.toList());
    9693    }
    9794
Note: See TracChangeset for help on using the changeset viewer.