Skip to content

Commit 735ba4f

Browse files
committed
[java] can't modify an unmodifiable map
1 parent 1c5eee4 commit 735ba4f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

java/src/org/openqa/selenium/remote/session/FirefoxFilter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ public Map<String, Object> apply(Map<String, Object> unmodifiedCaps) {
5555
Map<String, Object> options = (Map<String, Object>) unmodifiedCaps.getOrDefault(
5656
"moz:firefoxOptions",
5757
new TreeMap<>());
58+
options = new TreeMap<>(options);
59+
5860
if (unmodifiedCaps.containsKey("firefox_binary") && !options.containsKey("binary")) {
5961
// Here's hoping that the binary is just a string. It should be as FirefoxBinary.toJson just
6062
// encodes the path.

0 commit comments

Comments
 (0)