Signed-off-by: Taylor Smock <taylor.smock@kaart.com>
pull/1/head
Taylor Smock 2020-06-22 08:27:38 -06:00
rodzic 8be1579789
commit 5cf2aafd1a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 625F6A74A3E4311A
2 zmienionych plików z 10 dodań i 2 usunięć

Wyświetl plik

@ -19,6 +19,7 @@ import java.util.concurrent.ExecutorService;
import org.openstreetmap.josm.data.StructUtils;
import org.openstreetmap.josm.data.imagery.ImageryInfo;
import org.openstreetmap.josm.gui.MainApplication;
import org.openstreetmap.josm.gui.PleaseWaitRunnable;
import org.openstreetmap.josm.gui.util.GuiHelper;
import org.openstreetmap.josm.io.CachedFile;
@ -114,7 +115,7 @@ public class MapWithAILayerInfo {
}
Collections.sort(layers);
}
loadDefaults(false, null, fastFail, null);
loadDefaults(false, MainApplication.worker, fastFail, null);
}
/**

Wyświetl plik

@ -160,7 +160,14 @@ public class MapWithAISourceReader implements Closeable {
private static List<ImageryInfo.ImageryBounds> getBounds(JsonValue countries) {
if (JsonValue.ValueType.OBJECT == countries.getValueType()) {
Set<String> codes = Territories.getKnownIso3166Codes();
Set<String> codes;
try {
codes = Territories.getKnownIso3166Codes();
} catch (NullPointerException e) {
// Fix JOSM-19420
Territories.initializeInternalData();
codes = Territories.getKnownIso3166Codes();
}
List<ImageryBounds> bounds = new ArrayList<>();
for (Map.Entry<String, JsonValue> country : countries.asJsonObject().entrySet()) {
if (codes.contains(country.getKey())) {