From 40377e42b2236b02b61b020f0557184b34b7de83 Mon Sep 17 00:00:00 2001 From: Alexei Barantsev Date: Tue, 17 Mar 2015 01:11:34 +0300 Subject: [PATCH] java: Fixing sessionId format in marionette connector --- .../selenium/firefox/internal/MarionetteConnection.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/java/client/src/org/openqa/selenium/firefox/internal/MarionetteConnection.java b/java/client/src/org/openqa/selenium/firefox/internal/MarionetteConnection.java index 95d6cee4e2c08..6123e78c30c6d 100644 --- a/java/client/src/org/openqa/selenium/firefox/internal/MarionetteConnection.java +++ b/java/client/src/org/openqa/selenium/firefox/internal/MarionetteConnection.java @@ -192,9 +192,8 @@ public Response execute(Command command) throws IOException { Map map = new JsonToBeanConverter().convert(Map.class, rawResponse); Response response; if (DriverCommand.NEW_SESSION.equals(command.getName())) { - // See https://bugzilla.mozilla.org/show_bug.cgi?id=1073732 - response = new Response(new SessionId(new BeanToJsonConverter().convert(map.get("value")))); - response.setValue(Maps.newHashMap()); + response = new Response(new SessionId(map.get("sessionId").toString())); + response.setValue(map.get("value")); } else { if (map.containsKey("error")) { @@ -307,7 +306,7 @@ private String serializeCommand(Command command) { map.put("name", commandName); if (command.getSessionId() != null) { // See https://bugzilla.mozilla.org/show_bug.cgi?id=1073732 - map.put("sessionId", new JsonToBeanConverter().convert(Map.class, command.getSessionId().toString())); + map.put("sessionId", command.getSessionId().toString()); } map.put("parameters", params);