Skip to content

Commit 4114a07

Browse files
committed
Fixing SessionId from json converter to better handle the case of null sessionId
1 parent 65f9399 commit 4114a07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: java/client/src/org/openqa/selenium/remote/JsonToBeanConverter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ private <T> T convert(Class<T> clazz, Object text, int depth) {
9595
JsonObject json = new JsonParser().parse((String) text).getAsJsonObject();
9696

9797
SessionId sessionId = null;
98-
if (json.has("sessionId")) {
98+
if (json.has("sessionId") && !json.get("sessionId").isJsonNull()) {
9999
sessionId = convert(SessionId.class, json.get("sessionId"), depth + 1);
100100
}
101101

0 commit comments

Comments
 (0)