Skip to content

Commit 7eeaf92

Browse files
committed
Refactor InternetExplorerDriver constructor to use conditional assignment for options, service, and clientConfig
1 parent ef5561a commit 7eeaf92

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

java/src/org/openqa/selenium/ie/InternetExplorerDriver.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,17 +112,10 @@ public InternetExplorerDriver(
112112
@Nullable InternetExplorerDriverService service,
113113
@Nullable InternetExplorerOptions options,
114114
@Nullable ClientConfig clientConfig) {
115-
if (options == null) {
116-
options = new InternetExplorerOptions();
117-
}
118-
if (service == null) {
119-
service = InternetExplorerDriverService.createDefaultService();
120-
}
115+
options = options == null ? new InternetExplorerOptions() : options;
116+
service = service == null ? InternetExplorerDriverService.createDefaultService() : service;
117+
clientConfig = clientConfig == null ? ClientConfig.defaultConfig() : clientConfig;
121118
service.setExecutable(new DriverFinder(service, options).getDriverPath());
122-
if (clientConfig == null) {
123-
clientConfig = ClientConfig.defaultConfig();
124-
}
125-
126119
run(service, options, clientConfig);
127120
}
128121

0 commit comments

Comments
 (0)