Skip to content

Commit

Permalink
java: Fixing sessionId format in marionette connector
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Mar 16, 2015
1 parent bb13f6d commit 40377e4
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,8 @@ public Response execute(Command command) throws IOException {
Map<String, Object> 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")) {
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 40377e4

Please sign in to comment.