From 7e2993b11a2386548bbfafee7f44b9d8219cd630 Mon Sep 17 00:00:00 2001 From: Boni Garcia Date: Wed, 16 Feb 2022 00:01:53 +0100 Subject: [PATCH] Several minor smell-fixes --- src/main/java/io/github/bonigarcia/wdm/WebDriverManager.java | 4 ++-- .../java/io/github/bonigarcia/wdm/test/mirror/MirrorTest.java | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/github/bonigarcia/wdm/WebDriverManager.java b/src/main/java/io/github/bonigarcia/wdm/WebDriverManager.java index 1fd26d3ca..3cc6e2ae8 100644 --- a/src/main/java/io/github/bonigarcia/wdm/WebDriverManager.java +++ b/src/main/java/io/github/bonigarcia/wdm/WebDriverManager.java @@ -1363,7 +1363,7 @@ protected List getDriversFromMirror(URL driverUrl, } private List getMirrorUrls(URL driverUrl, String versionPath) - throws MalformedURLException, IOException { + throws IOException { List urls; HttpGet get = getHttpClient() .createHttpGet(new URL(driverUrl, versionPath)); @@ -1374,7 +1374,7 @@ private List getMirrorUrls(URL driverUrl, String versionPath) Gson gson = gsonBuilder.create(); NpmMirror[] releaseArray = gson.fromJson(reader, NpmMirror[].class); - urls = Arrays.stream(releaseArray).map(release -> release.getUrl()) + urls = Arrays.stream(releaseArray).map(NpmMirror::getUrl) .collect(Collectors.toList()); } return urls; diff --git a/src/test/java/io/github/bonigarcia/wdm/test/mirror/MirrorTest.java b/src/test/java/io/github/bonigarcia/wdm/test/mirror/MirrorTest.java index ca0a528eb..e4783af47 100644 --- a/src/test/java/io/github/bonigarcia/wdm/test/mirror/MirrorTest.java +++ b/src/test/java/io/github/bonigarcia/wdm/test/mirror/MirrorTest.java @@ -23,6 +23,7 @@ import java.net.URL; import java.util.List; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import io.github.bonigarcia.wdm.WebDriverManager; @@ -74,6 +75,7 @@ void testMirrorException() { .isInstanceOf(WebDriverManagerException.class); } + @Disabled("Too slow") @Test void testMirrorDriverList() { List driverVersions = WebDriverManager.chromedriver()