diff options
Diffstat (limited to 'sonar-gwt-api')
-rw-r--r-- | sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/unmarshallers/ServerUnmarshaller.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/unmarshallers/ServerUnmarshaller.java b/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/unmarshallers/ServerUnmarshaller.java index 87646fb0305..ad87a8133e6 100644 --- a/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/unmarshallers/ServerUnmarshaller.java +++ b/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/unmarshallers/ServerUnmarshaller.java @@ -31,9 +31,15 @@ public class ServerUnmarshaller implements Unmarshaller<Server> { public Server toModel(JavaScriptObject json) { JSONObject map = new JSONObject(json); - return new Server() + Server server = new Server() .setId(JsonUtils.getString(map, "id")) .setVersion(JsonUtils.getString(map, "version")); + server.setStatusMessage(JsonUtils.getString(map, "status_msg")); + String status = JsonUtils.getString(map, "status"); + if (status != null) { + server.setStatus(Server.Status.valueOf(status)); + } + return server; } public List<Server> toModels(JavaScriptObject json) { |