|
16 | 16 | // under the License.
|
17 | 17 | package org.openqa.selenium.manager;
|
18 | 18 |
|
19 |
| -import com.google.common.collect.ImmutableList; |
20 | 19 | import com.google.common.io.CharStreams;
|
21 | 20 |
|
22 | 21 | import org.openqa.selenium.Beta;
|
@@ -164,16 +163,18 @@ private synchronized File getBinary() {
|
164 | 163 | * @return the location of the driver.
|
165 | 164 | */
|
166 | 165 | public String getDriverPath(Capabilities options) {
|
167 |
| - File binaryFile = getBinary(); |
168 |
| - if (binaryFile == null) { |
169 |
| - return null; |
170 |
| - } |
171 |
| - List<String> commandList = new ArrayList(Arrays.asList(binaryFile.getAbsolutePath(), |
172 |
| - "--browser", options.getBrowserName(), |
173 |
| - "--output", "json")); |
174 |
| - if (!options.getBrowserVersion().isEmpty()) { |
175 |
| - commandList.addAll(Arrays.asList("--browser-version", options.getBrowserVersion())); |
176 |
| - } |
177 |
| - return runCommand(commandList.toArray(new String[0])); |
| 166 | + File binaryFile = getBinary(); |
| 167 | + if (binaryFile == null) { |
| 168 | + return null; |
| 169 | + } |
| 170 | + List<String> commandList = new ArrayList<>( |
| 171 | + Arrays.asList(binaryFile.getAbsolutePath(), |
| 172 | + "--browser", |
| 173 | + options.getBrowserName(), |
| 174 | + "--output", "json")); |
| 175 | + if (!options.getBrowserVersion().isEmpty()) { |
| 176 | + commandList.addAll(Arrays.asList("--browser-version", options.getBrowserVersion())); |
| 177 | + } |
| 178 | + return runCommand(commandList.toArray(new String[0])); |
178 | 179 | }
|
179 | 180 | }
|
0 commit comments