Skip to content

Commit 06a7dff

Browse files
committed
[java] Explicitly using no-args constructor to create an instance of HttpClient using reflection.
1 parent 7108f3a commit 06a7dff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/client/src/org/openqa/selenium/remote/http/HttpClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static Factory createDefault() {
4444
Class<? extends Factory> clazz =
4545
Class.forName("org.openqa.selenium.remote.http.okhttp.OkHttpClient$Factory")
4646
.asSubclass(Factory.class);
47-
return clazz.newInstance();
47+
return clazz.getConstructor().newInstance();
4848
} catch (ReflectiveOperationException e) {
4949
throw new UnsupportedOperationException("Unable to create HTTP client factory", e);
5050
}

0 commit comments

Comments
 (0)