Skip to content

Commit ddccdc2

Browse files
committed
Make AbstractCapabilities implement toJson
The capabilities subclasses were the only thing using `asMap` for serialisation to JSON. Everywhere else, we use `toJson`. Might as well make it consistent.
1 parent 76f27e0 commit ddccdc2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

java/client/src/org/openqa/selenium/AbstractCapabilities.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ public Map<String, Object> asMap() {
102102
return Collections.unmodifiableMap(caps);
103103
}
104104

105+
public Map<String, Object> toJson() {
106+
return asMap();
107+
}
108+
105109
/**
106110
* Subclasses can use this to add information that isn't always in the capabilities map.
107111
*/

0 commit comments

Comments
 (0)