[java] Explicitly using no-args constructor to create an instance of HttpClient using reflection.
@@ -44,7 +44,7 @@ static Factory createDefault() {
Class<? extends Factory> clazz =
Class.forName("org.openqa.selenium.remote.http.okhttp.OkHttpClient$Factory")
.asSubclass(Factory.class);
- return clazz.newInstance();
+ return clazz.getConstructor().newInstance();
} catch (ReflectiveOperationException e) {
throw new UnsupportedOperationException("Unable to create HTTP client factory", e);
}
