Skip to content

Commit 5860546

Browse files
committed
[java] Fixing formatting and casting
[skip ci]
1 parent 50bc1d7 commit 5860546

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

java/src/org/openqa/selenium/manager/SeleniumManager.java

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
// under the License.
1717
package org.openqa.selenium.manager;
1818

19-
import com.google.common.collect.ImmutableList;
2019
import com.google.common.io.CharStreams;
2120

2221
import org.openqa.selenium.Beta;
@@ -164,16 +163,18 @@ private synchronized File getBinary() {
164163
* @return the location of the driver.
165164
*/
166165
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]));
178179
}
179180
}

0 commit comments

Comments
 (0)