aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-gwt-api
diff options
context:
space:
mode:
authorGodin <mandrikov@gmail.com>2010-12-01 13:19:46 +0000
committerGodin <mandrikov@gmail.com>2010-12-01 13:19:46 +0000
commit0ec9be1302badbb39c4d9e6d9166584aabab914d (patch)
treee6c41bf8c04fb854dbb9fb99ace46521830178e9 /sonar-gwt-api
parent36c05bb83f2221a55d5df2d2a04de6f597d70528 (diff)
downloadsonarqube-0ec9be1302badbb39c4d9e6d9166584aabab914d.tar.gz
sonarqube-0ec9be1302badbb39c4d9e6d9166584aabab914d.zip
SONAR-1450:
* Expose rule_failure.created_at in rest api * Support createdAt in sonar-ws-client
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"));