From ddccdc230b29f123c0b8ad75104e14d9484592b7 Mon Sep 17 00:00:00 2001 From: Simon Stewart Date: Tue, 6 Mar 2018 11:25:29 +0000 Subject: [PATCH] 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. --- java/client/src/org/openqa/selenium/AbstractCapabilities.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/java/client/src/org/openqa/selenium/AbstractCapabilities.java b/java/client/src/org/openqa/selenium/AbstractCapabilities.java index f82d4ed81be25..dc1b49fac0afd 100644 --- a/java/client/src/org/openqa/selenium/AbstractCapabilities.java +++ b/java/client/src/org/openqa/selenium/AbstractCapabilities.java @@ -102,6 +102,10 @@ public Map asMap() { return Collections.unmodifiableMap(caps); } + public Map toJson() { + return asMap(); + } + /** * Subclasses can use this to add information that isn't always in the capabilities map. */