Skip to content

Commit

Permalink
Make AbstractCapabilities implement toJson
Browse files Browse the repository at this point in the history
The capabilities subclasses were the only thing using `asMap`
for serialisation to JSON. Everywhere else, we use `toJson`.
Might as well make it consistent.
  • Loading branch information
shs96c committed Mar 6, 2018
1 parent 76f27e0 commit ddccdc2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions java/client/src/org/openqa/selenium/AbstractCapabilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ public Map<String, Object> asMap() {
return Collections.unmodifiableMap(caps);
}

public Map<String, Object> toJson() {
return asMap();
}

/**
* Subclasses can use this to add information that isn't always in the capabilities map.
*/
Expand Down

0 comments on commit ddccdc2

Please sign in to comment.