From 75f14132e11345a4212c1693973bca6112f515dc Mon Sep 17 00:00:00 2001 From: Jk Date: Sun, 15 Jan 2023 12:43:05 +0100 Subject: [PATCH 1/3] Remove call to ServiceLoader.findFist to support Android Updated coverage --- metarParser-parsers/pom.xml | 2 +- .../src/main/java/io/github/mivek/command/AirportSupplier.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/metarParser-parsers/pom.xml b/metarParser-parsers/pom.xml index d45a6512..46180436 100644 --- a/metarParser-parsers/pom.xml +++ b/metarParser-parsers/pom.xml @@ -13,7 +13,7 @@ Module containing the parsers. - 1 + 0.99 0.98 0.99 diff --git a/metarParser-parsers/src/main/java/io/github/mivek/command/AirportSupplier.java b/metarParser-parsers/src/main/java/io/github/mivek/command/AirportSupplier.java index 76dc0d21..7c40edf3 100644 --- a/metarParser-parsers/src/main/java/io/github/mivek/command/AirportSupplier.java +++ b/metarParser-parsers/src/main/java/io/github/mivek/command/AirportSupplier.java @@ -3,7 +3,6 @@ import io.github.mivek.model.Airport; import io.github.mivek.provider.airport.AirportProvider; import io.github.mivek.provider.airport.impl.DefaultAirportProvider; - import java.util.ServiceLoader; /** @@ -22,7 +21,7 @@ public AirportSupplier() { @Override public Airport get(final String string) { - AirportProvider provider = airportLoader.findFirst().orElseGet(DefaultAirportProvider::new); + AirportProvider provider = airportLoader.iterator().hasNext() ? airportLoader.iterator().next() : new DefaultAirportProvider(); return provider.getAirports().get(string); } } From 0149726b2631cb51fc09218a75e21b567904f92f Mon Sep 17 00:00:00 2001 From: Jk Date: Sun, 15 Jan 2023 12:43:50 +0100 Subject: [PATCH 2/3] Reactivate OurAirportsAirportProviderTest class --- metarParser-spi/pom.xml | 6 +++--- .../impl/OurAirportsAirportProviderTest.java | 15 +++++++-------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/metarParser-spi/pom.xml b/metarParser-spi/pom.xml index 76f860cc..40ca6db5 100644 --- a/metarParser-spi/pom.xml +++ b/metarParser-spi/pom.xml @@ -12,9 +12,9 @@ metarParser-spi - 0.45 - 0.5 - 0.5 + 0.96 + 1 + 1 diff --git a/metarParser-spi/src/test/java/io/github/mivek/provider/airport/impl/OurAirportsAirportProviderTest.java b/metarParser-spi/src/test/java/io/github/mivek/provider/airport/impl/OurAirportsAirportProviderTest.java index 425d3a8e..6c7597a0 100644 --- a/metarParser-spi/src/test/java/io/github/mivek/provider/airport/impl/OurAirportsAirportProviderTest.java +++ b/metarParser-spi/src/test/java/io/github/mivek/provider/airport/impl/OurAirportsAirportProviderTest.java @@ -1,22 +1,21 @@ package io.github.mivek.provider.airport.impl; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.anEmptyMap; +import static org.hamcrest.Matchers.hasKey; +import static org.hamcrest.Matchers.not; +import static org.junit.jupiter.api.Assertions.assertNotNull; + import io.github.mivek.model.Airport; import io.github.mivek.provider.airport.AirportProvider; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - import java.io.IOException; import java.net.URISyntaxException; import java.util.Map; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.*; -import static org.junit.jupiter.api.Assertions.assertNotNull; +import org.junit.jupiter.api.Test; /** * @author mivek */ -@Disabled class OurAirportsAirportProviderTest { @Test From c6c8c4a88dad1ae000f0246f7e6162f6444d0269 Mon Sep 17 00:00:00 2001 From: Jk Date: Sun, 15 Jan 2023 12:53:24 +0100 Subject: [PATCH 3/3] Update dependencies --- pom.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index a5513a54..3ff8da16 100644 --- a/pom.xml +++ b/pom.xml @@ -51,24 +51,24 @@ 0.96 0.97 1.0.1 - 10.5.0 + 10.6.0 3.12.0 2.2 0.8.8 - 5.9.1 - 3.2.0 + 5.9.2 + 3.2.1 3.10.1 3.0.1 3.4.1 - 3.4.1 + 3.4.2 3.12.1 3.2.1 - 3.0.0-M7 + 3.0.0-M8 1.6.13 1.9.0 - 1.1.0 - 1.9.11 - 2.0.5 + 1.1.2 + 1.10.4 + 2.0.6 4.7.3.0 mivek-github https://sonarcloud.io