diff --git a/java/spotbugs-excludes.xml b/java/spotbugs-excludes.xml index 389ebc78a76f3..d62598f910a60 100644 --- a/java/spotbugs-excludes.xml +++ b/java/spotbugs-excludes.xml @@ -230,4 +230,9 @@ + + + + + diff --git a/java/src/org/openqa/selenium/manager/SeleniumManager.java b/java/src/org/openqa/selenium/manager/SeleniumManager.java index 2c7acdbc9f1b5..f761fe7e2df43 100644 --- a/java/src/org/openqa/selenium/manager/SeleniumManager.java +++ b/java/src/org/openqa/selenium/manager/SeleniumManager.java @@ -209,7 +209,7 @@ private synchronized Path getBinary() { if (!binary.toFile().exists()) { String binaryPathInJar = String.format("%s/%s%s", folder, SELENIUM_MANAGER, extension); try (InputStream inputStream = this.getClass().getResourceAsStream(binaryPathInJar)) { - binary.getParent().toFile().mkdirs(); + Files.createDirectories(binary.getParent()); Files.copy(inputStream, binary); } } diff --git a/java/src/org/openqa/selenium/manager/SeleniumManagerOutput.java b/java/src/org/openqa/selenium/manager/SeleniumManagerOutput.java index 62bc45273cbe5..1faee3a809729 100644 --- a/java/src/org/openqa/selenium/manager/SeleniumManagerOutput.java +++ b/java/src/org/openqa/selenium/manager/SeleniumManagerOutput.java @@ -98,6 +98,10 @@ private static Log fromJson(JsonInput input) { case "message": message = input.nextString(); break; + + default: + input.skipValue(); + break; } } input.endObject();