aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-gwt-api
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-gwt-api')
-rw-r--r--sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/unmarshallers/ViolationUnmarshaller.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/unmarshallers/ViolationUnmarshaller.java b/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/unmarshallers/ViolationUnmarshaller.java
index 30750eb6782..7dc2efae3a5 100644
--- a/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/unmarshallers/ViolationUnmarshaller.java
+++ b/sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/unmarshallers/ViolationUnmarshaller.java
@@ -30,15 +30,16 @@ public class ViolationUnmarshaller extends AbstractUnmarshaller<Violation> {
violation.setMessage(JsonUtils.getString(json, "message"));
violation.setLine(JsonUtils.getInteger(json, "line"));
violation.setPriority(JsonUtils.getString(json, "priority"));
+ violation.setCreatedAt(JsonUtils.getDate(json, "createdAt"));
- JSONObject rule = (JSONObject)json.get("rule");
- if (rule!=null) {
+ JSONObject rule = (JSONObject) json.get("rule");
+ if (rule != null) {
violation.setRuleKey(JsonUtils.getString(rule, "key"));
violation.setRuleName(JsonUtils.getString(rule, "name"));
}
- JSONObject resource = (JSONObject)json.get("resource");
- if (resource!=null) {
+ JSONObject resource = (JSONObject) json.get("resource");
+ if (resource != null) {
violation.setResourceKey(JsonUtils.getString(resource, "key"));
violation.setResourceName(JsonUtils.getString(resource, "name"));
violation.setResourceQualifier(JsonUtils.getString(resource, "qualifier"));