Skip to content

Commit a9f8869

Browse files
committed
Avoid looking up the driver provider more than once.
1 parent 557a114 commit a9f8869

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/server/src/org/openqa/selenium/remote/server/DefaultDriverFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ DriverProvider getProviderMatching(Capabilities desired) {
5757
public WebDriver newInstance(Capabilities capabilities) {
5858
DriverProvider provider = getProviderMatching(capabilities);
5959
if (provider.canCreateDriverInstanceFor(capabilities)) {
60-
return getProviderMatching(capabilities).newInstance(capabilities);
60+
return provider.newInstance(capabilities);
6161
}
6262
throw new WebDriverException(String.format(
6363
"The best matching driver provider %s can't create a new driver instance for %s",

0 commit comments

Comments
 (0)