Skip to content

Commit

Permalink
[java] Explicitly using no-args constructor to create an instance of …
Browse files Browse the repository at this point in the history
…HttpClient using reflection.
  • Loading branch information
barancev committed Sep 29, 2019
1 parent 7108f3a commit 06a7dff
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 06a7dff

Please sign in to comment.