Skip to content

Commit

Permalink
A couple of minor smell-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bonigarcia committed Jun 20, 2023
1 parent 0d49671 commit 857221f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/main/java/io/github/bonigarcia/wdm/online/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ public class Parser {

static final Logger log = getLogger(lookup().lookupClass());

private Parser() {
throw new IllegalStateException("Utility class");
}

public static <T> T parseJson(HttpClient client, String url, Class<T> klass)
throws IOException {
HttpGet get = client.createHttpGet(new URL(url));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ public Optional<String> getDriverVersionFromRepository(
// Parse JSON using GoodVersions
cftUrl = config.getChromeGoodVersionsUrl();

System.out.println(driverVersion);
GoodVersions versions = Parser.parseJson(httpClient, cftUrl,
GoodVersions.class);
List<Versions> fileteredList = versions.versions.stream()
Expand All @@ -137,9 +136,9 @@ public Optional<String> getDriverVersionFromRepository(
// Parse JSON using LastGoodVersions
cftUrl = config.getChromeLastGoodVersionsUrl();

System.out.println(driverVersion);
LastGoodVersions versions = Parser.parseJson(httpClient,
cftUrl, LastGoodVersions.class);

return Optional.of(versions.channels.stable.version);
}
} catch (Exception e) {
Expand Down

0 comments on commit 857221f

Please sign in to comment.