Skip to content

Commit 49b0344

Browse files
committed
[java] Revert workaround for old netty http client (addendum to SeleniumHQ#12843)
Workaround was made as part of the fix (3f7f57c) the bug SeleniumHQ#11750 which was specific for netty client only. Since SeleniumHQ#12843 the netty client was removed.
1 parent ce96b41 commit 49b0344

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

java/src/org/openqa/selenium/chromium/ChromiumOptions.java

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -120,24 +120,12 @@ public T addArguments(String... arguments) {
120120
* "allow-outdated-plugins");
121121
* </code></pre>
122122
*
123-
* <p>Each argument may contain an option "--" prefix: "--foo" or "foo". Arguments with an
123+
* <p>Each argument may contain an optional "--" prefix: "--foo" or "foo". Arguments with an
124124
* associated value should be delimited with an "=": "foo=bar".
125125
*
126126
* @param arguments The arguments to use when starting Chrome.
127127
*/
128128
public T addArguments(List<String> arguments) {
129-
/*
130-
--remote-allow-origins is being added by default since Chrome 111. We need to check
131-
if the argument already exists and then remove it.
132-
*/
133-
String remoteAllowOrigins = "remote-allow-origins";
134-
Optional<String> newArg =
135-
arguments.stream().filter(arg -> arg.contains(remoteAllowOrigins)).findFirst();
136-
Optional<String> existingArg =
137-
args.stream().filter(arg -> arg.contains(remoteAllowOrigins)).findFirst();
138-
if (newArg.isPresent() && existingArg.isPresent()) {
139-
args.remove(existingArg.get());
140-
}
141129
args.addAll(arguments);
142130
return (T) this;
143131
}

0 commit comments

Comments
 (0)