MapWithAISourceReader#getBounds *must* return a modifiable list

Also, add @Territories annotation to a test that needed it

Signed-off-by: Taylor Smock <tsmock@meta.com>
pull/8/head
Taylor Smock 2022-12-07 06:02:37 -07:00
rodzic 9d685d9baa
commit 61d5b62689
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 233BB2E466604E27
2 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -131,8 +131,8 @@ public class MapWithAISourceReader extends CommonSourceReader<List<MapWithAIInfo
CountryUtils.getCountryShape(country.getKey()).ifPresent(bounds::add);
}
}
return Collections.unmodifiableList(bounds);
return bounds;
}
return Collections.emptyList();
return new ArrayList<>();
}
}

Wyświetl plik

@ -14,6 +14,7 @@ import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.openstreetmap.josm.data.Bounds;
import org.openstreetmap.josm.plugins.mapwithai.backend.MapWithAIDataUtilsTest;
import org.openstreetmap.josm.plugins.mapwithai.testutils.annotations.Territories;
import org.openstreetmap.josm.plugins.mapwithai.testutils.annotations.Wiremock;
import org.openstreetmap.josm.testutils.JOSMTestRules;
import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
@ -21,6 +22,7 @@ import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@BasicPreferences
@Territories
@Wiremock
class MapWithAIDownloadSourceTypeTest {
@RegisterExtension