Fix a concurrent modification error for a list and add

Signed-off-by: Taylor Smock <taylor.smock@kaart.com>
pull/1/head
Taylor Smock 2019-11-04 08:04:20 -07:00
rodzic 114920c8ee
commit a49f8358c3
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 625F6A74A3E4311A
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -78,7 +78,7 @@ public final class MapWithAIDataUtils {
* Remove MapWithAI paint styles * Remove MapWithAI paint styles
*/ */
public static void removeMapWithAIPaintStyles() { public static void removeMapWithAIPaintStyles() {
MapPaintStyles.getStyles().getStyleSources().parallelStream() new ArrayList<>(MapPaintStyles.getStyles().getStyleSources()).parallelStream()
.filter(source -> PAINT_STYLE_RESOURCE_URL.equals(source.url)) .filter(source -> PAINT_STYLE_RESOURCE_URL.equals(source.url))
.forEach(MapPaintStyles::removeStyle); .forEach(MapPaintStyles::removeStyle);
} }