aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws-client/src/main/java/org/sonar/wsclient
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-ws-client/src/main/java/org/sonar/wsclient')
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/services/Violation.java19
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshaller.java3
2 files changed, 16 insertions, 6 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Violation.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Violation.java
index e29c37396ba..0d5b816425f 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Violation.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Violation.java
@@ -33,7 +33,8 @@ public class Violation extends Model {
private String resourceScope = null;
private String resourceQualifier = null;
private Date createdAt = null;
- private boolean switchedOff;
+ private boolean falsePositive;
+ private Long reviewId = null;
public String getMessage() {
return message;
@@ -159,16 +160,24 @@ public class Violation extends Model {
/**
* @since 2.8
*/
- public Violation setSwitchedOff(boolean switchedOff) {
- this.switchedOff = switchedOff;
+ public Violation setFalsePositive(Boolean b) {
+ this.falsePositive = (b != null && b);
return this;
}
/**
* @since 2.8
*/
- public boolean isSwitchedOff() {
- return switchedOff;
+ public boolean isFalsePositive() {
+ return falsePositive;
}
+ public Long getReviewId() {
+ return reviewId;
+ }
+
+ public Violation setReviewId(Long l) {
+ this.reviewId = l;
+ return this;
+ }
}
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshaller.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshaller.java
index df62e5c0e16..45f692b582c 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshaller.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshaller.java
@@ -33,7 +33,8 @@ public class ViolationUnmarshaller extends AbstractUnmarshaller<Violation> {
violation.setLine(utils.getInteger(json, "line"));
violation.setSeverity(utils.getString(json, "priority"));
violation.setCreatedAt(utils.getDateTime(json, "createdAt"));
- violation.setSwitchedOff(utils.getBoolean(json, "switchedOff"));
+ violation.setFalsePositive(utils.getBoolean(json, "falsePositive"));
+ violation.setReviewId(utils.getLong(json, "review"));
Object rule = utils.getField(json, "rule");
if (rule != null) {