Skip to content

Commit fbb6e58

Browse files
Use Capabilities rather than ImmutableCapabilities in mutators
1 parent 264476a commit fbb6e58

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/org/openqa/selenium/remote/NewSessionPayload.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ public void writeTo(Appendable appendable) throws IOException {
221221

222222
Map<String, Object> first = getOss();
223223
if (first == null) {
224-
first = stream().findFirst()
224+
//noinspection unchecked
225+
first = (Map<String, Object>) stream().findFirst()
225226
.orElse(new ImmutableCapabilities())
226227
.asMap();
227228
}
@@ -309,7 +310,7 @@ private void streamW3CProtocolParameters(JsonOutput out, Map<String, Object> des
309310
* equivalent W3C capabilities isn't particularly easy, so it's hoped that this approach gives us
310311
* the most compatible implementation.
311312
*/
312-
public Stream<ImmutableCapabilities> stream() throws IOException {
313+
public Stream<Capabilities> stream() throws IOException {
313314
// OSS first
314315
Stream<Map<String, Object>> oss = Stream.of(getOss());
315316

0 commit comments

Comments
 (0)