diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2015-01-21 15:10:24 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2015-01-21 15:10:30 +0100 |
commit | 3d25febc1c4870c2f9d4d0f852824519c4544d38 (patch) | |
tree | 814540137be6b38910a7c2ceb902212c79e0c9e9 /sonar-batch-protocol | |
parent | 45e68e75931ccef49f458e8e473c75330675f685 (diff) | |
download | sonarqube-3d25febc1c4870c2f9d4d0f852824519c4544d38.tar.gz sonarqube-3d25febc1c4870c2f9d4d0f852824519c4544d38.zip |
SONAR-6012 Replace componentPath by componentKey
Diffstat (limited to 'sonar-batch-protocol')
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); |