aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch-protocol
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-batch-protocol')
-rw-r--r--sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/issues/PreviousIssue.java10
-rw-r--r--sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/input/issues/PreviousIssueHelperTest.java8
2 files changed, 9 insertions, 9 deletions
diff --git a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/issues/PreviousIssue.java b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/issues/PreviousIssue.java
index 2711b8f1cae..32432f731e7 100644
--- a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/issues/PreviousIssue.java
+++ b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/issues/PreviousIssue.java
@@ -24,7 +24,7 @@ import javax.annotation.Nullable;
public class PreviousIssue {
private String key;
- private String componentPath;
+ private String componentKey;
private String ruleKey;
private String ruleRepo;
private Integer line;
@@ -45,13 +45,13 @@ public class PreviousIssue {
return key;
}
- public PreviousIssue setComponentPath(@Nullable String path) {
- this.componentPath = path;
+ public PreviousIssue setComponentKey(@Nullable String key) {
+ this.componentKey = key;
return this;
}
- public String componentPath() {
- return componentPath;
+ public String componentKey() {
+ return componentKey;
}
public PreviousIssue setLine(Integer line) {
diff --git a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/input/issues/PreviousIssueHelperTest.java b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/input/issues/PreviousIssueHelperTest.java
index 1e5264b4ad2..1462bb32e23 100644
--- a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/input/issues/PreviousIssueHelperTest.java
+++ b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/input/issues/PreviousIssueHelperTest.java
@@ -38,7 +38,7 @@ public class PreviousIssueHelperTest {
PreviousIssue issue1 = new PreviousIssue();
issue1.setKey("key1");
- issue1.setComponentPath("path");
+ issue1.setComponentKey("key");
issue1.setRuleKey("repokey", "rulekey");
issue1.setLine(2);
issue1.setMessage("message");
@@ -58,7 +58,7 @@ public class PreviousIssueHelperTest {
JSONAssert
.assertEquals(
- "[{\"key\": \"key1\", \"componentPath\": \"path\", \"ruleKey\": \"rulekey\", \"ruleRepo\": \"repokey\", \"line\": 2,\"message\": \"message\", \"severity\": \"severity\", \"resolution\": \"resolution\", \"status\": \"status\", \"checksum\": \"checksum\",\"assigneeLogin\": \"login\", \"assigneeFullname\": \"fullname\"},"
+ "[{\"key\": \"key1\", \"componentKey\": \"key\", \"ruleKey\": \"rulekey\", \"ruleRepo\": \"repokey\", \"line\": 2,\"message\": \"message\", \"severity\": \"severity\", \"resolution\": \"resolution\", \"status\": \"status\", \"checksum\": \"checksum\",\"assigneeLogin\": \"login\", \"assigneeFullname\": \"fullname\"},"
+
"{\"key\": \"key2\"}]",
out.getBuffer().toString(), true);
@@ -77,7 +77,7 @@ public class PreviousIssueHelperTest {
StringWriter out = new StringWriter();
PreviousIssueHelper helper = PreviousIssueHelper.create(out);
StringReader reader = new StringReader(
- "[{\"key\": \"key1\", \"componentPath\": \"path\", \"ruleKey\": \"rulekey\", \"ruleRepo\": \"repokey\", \"line\": 2,\"message\": \"message\", \"severity\": \"severity\", \"resolution\": \"resolution\", \"status\": \"status\", \"checksum\": \"checksum\",\"assigneeLogin\": \"login\", \"assigneeFullname\": \"fullname\"},"
+ "[{\"key\": \"key1\", \"componentKey\": \"key\", \"ruleKey\": \"rulekey\", \"ruleRepo\": \"repokey\", \"line\": 2,\"message\": \"message\", \"severity\": \"severity\", \"resolution\": \"resolution\", \"status\": \"status\", \"checksum\": \"checksum\",\"assigneeLogin\": \"login\", \"assigneeFullname\": \"fullname\"},"
+
"{\"key\": \"key2\"}]");
@@ -88,7 +88,7 @@ public class PreviousIssueHelperTest {
assertThat(iterator.hasNext()).isFalse();
assertThat(issue1.key()).isEqualTo("key1");
- assertThat(issue1.componentPath()).isEqualTo("path");
+ assertThat(issue1.componentKey()).isEqualTo("key");
assertThat(issue1.ruleRepo()).isEqualTo("repokey");
assertThat(issue1.ruleKey()).isEqualTo("rulekey");
assertThat(issue1.line()).isEqualTo(2);