@@ -173,14 +173,14 @@ private void streamW3CProtocolParameters(
173
173
("browserName" .equals (entry .getKey ()) && CHROME .equals (entry .getValue ().getAsString ())) ||
174
174
"chromeOptions" .equals (entry .getKey ()))
175
175
.distinct ()
176
- .collect (Collectors .toMap (Map .Entry ::getKey , Map .Entry ::getValue ));
176
+ .collect (Collectors .toMap (Map .Entry ::getKey , Map .Entry ::getValue , ( left , right ) -> right ));
177
177
178
178
Map <String , ?> edge = Stream .of (des , req )
179
179
.map (JsonObject ::entrySet )
180
180
.flatMap (Collection ::stream )
181
181
.filter (entry -> ("browserName" .equals (entry .getKey ()) && EDGE .equals (entry .getValue ().getAsString ())))
182
182
.distinct ()
183
- .collect (Collectors .toMap (Map .Entry ::getKey , Map .Entry ::getValue ));
183
+ .collect (Collectors .toMap (Map .Entry ::getKey , Map .Entry ::getValue , ( left , right ) -> right ));
184
184
185
185
Map <String , ?> firefox = Stream .of (des , req )
186
186
.map (JsonObject ::entrySet )
@@ -190,7 +190,7 @@ private void streamW3CProtocolParameters(
190
190
entry .getKey ().startsWith ("firefox_" ) ||
191
191
entry .getKey ().startsWith ("moz:" ))
192
192
.distinct ()
193
- .collect (Collectors .toMap (Map .Entry ::getKey , Map .Entry ::getValue ));
193
+ .collect (Collectors .toMap (Map .Entry ::getKey , Map .Entry ::getValue , ( left , right ) -> right ));
194
194
195
195
Map <String , ?> ie = Stream .of (req , des )
196
196
.map (JsonObject ::entrySet )
@@ -210,7 +210,7 @@ private void streamW3CProtocolParameters(
210
210
"silent" .equals (entry .getKey ()) ||
211
211
entry .getKey ().startsWith ("ie." ))
212
212
.distinct ()
213
- .collect (Collectors .toMap (Map .Entry ::getKey , Map .Entry ::getValue ));
213
+ .collect (Collectors .toMap (Map .Entry ::getKey , Map .Entry ::getValue , ( left , right ) -> right ));
214
214
215
215
Map <String , ?> opera = Stream .of (des , req )
216
216
.map (JsonObject ::entrySet )
@@ -220,7 +220,7 @@ private void streamW3CProtocolParameters(
220
220
("browserName" .equals (entry .getKey ()) && OPERA .equals (entry .getValue ().getAsString ())) ||
221
221
"operaOptions" .equals (entry .getKey ()))
222
222
.distinct ()
223
- .collect (Collectors .toMap (Map .Entry ::getKey , Map .Entry ::getValue ));
223
+ .collect (Collectors .toMap (Map .Entry ::getKey , Map .Entry ::getValue , ( left , right ) -> right ));
224
224
225
225
Map <String , ?> safari = Stream .of (des , req )
226
226
.map (JsonObject ::entrySet )
@@ -229,7 +229,7 @@ private void streamW3CProtocolParameters(
229
229
("browserName" .equals (entry .getKey ()) && SAFARI .equals (entry .getValue ().getAsString ())) ||
230
230
"safari.options" .equals (entry .getKey ()))
231
231
.distinct ()
232
- .collect (Collectors .toMap (Map .Entry ::getKey , Map .Entry ::getValue ));
232
+ .collect (Collectors .toMap (Map .Entry ::getKey , Map .Entry ::getValue , ( left , right ) -> right ));
233
233
234
234
Set <String > excludedKeys = Stream .of (chrome , edge , firefox , ie , opera , safari )
235
235
.map (Map ::keySet )
0 commit comments