Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

14034: Eliminate assumption of mutable list argument in SeleniumManager.getBinaryPaths() #14036

Merged
merged 2 commits into from
May 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions java/src/org/openqa/selenium/manager/SeleniumManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.nio.file.Path;
import java.nio.file.Paths;
import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import java.util.logging.Level;
Expand Down Expand Up @@ -232,16 +233,18 @@ private synchronized Path getBinary() {
* @return the locations of the assets from Selenium Manager execution
*/
public Result getBinaryPaths(List<String> arguments) {
arguments.add("--language-binding");
arguments.add("java");
arguments.add("--output");
arguments.add("json");
List<String> args = new ArrayList<>(arguments.size() + 5);
args.addAll(arguments);
args.add("--language-binding");
args.add("java");
args.add("--output");
args.add("json");

if (getLogLevel().intValue() <= Level.FINE.intValue()) {
arguments.add("--debug");
args.add("--debug");
}

return runCommand(getBinary(), arguments);
return runCommand(getBinary(), args);
}

private Level getLogLevel() {
Expand Down
Loading