aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2016-03-24 17:44:13 +0100
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2016-03-29 19:10:50 +0200
commitcbc00be035405cade14eef1366a89b65583242b8 (patch)
treefea94cd11f94b0f1ad8dbe2109235227333b0e1c /sonar-core
parentf661a14e2a03a44a9adfe18bb55f76754c9eabda (diff)
downloadsonarqube-cbc00be035405cade14eef1366a89b65583242b8.tar.gz
sonarqube-cbc00be035405cade14eef1366a89b65583242b8.zip
SONAR-7473 Drop 'reporter' field from backend
Diffstat (limited to 'sonar-core')
-rw-r--r--sonar-core/src/main/java/org/sonar/core/issue/DefaultIssue.java12
-rw-r--r--sonar-core/src/main/java/org/sonar/core/issue/DefaultIssueBuilder.java7
-rw-r--r--sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueTest.java8
3 files changed, 12 insertions, 15 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssue.java b/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssue.java
index aa56371cb11..e8885be59ba 100644
--- a/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssue.java
+++ b/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssue.java
@@ -75,7 +75,6 @@ public class DefaultIssue implements Issue, Trackable, org.sonar.api.ce.measure.
private Duration effort;
private String status;
private String resolution;
- private String reporter;
private String assignee;
private String checksum;
private Map<String, String> attributes = null;
@@ -340,15 +339,14 @@ public class DefaultIssue implements Issue, Trackable, org.sonar.api.ce.measure.
return this;
}
+ /**
+ * @deprecated since 5.5, manual issue feature has been dropped.
+ */
+ @Deprecated
@Override
@CheckForNull
public String reporter() {
- return reporter;
- }
-
- public DefaultIssue setReporter(@Nullable String s) {
- this.reporter = s;
- return this;
+ return null;
}
@Override
diff --git a/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssueBuilder.java b/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssueBuilder.java
index a97a4c089bd..4f44a40bba1 100644
--- a/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssueBuilder.java
+++ b/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssueBuilder.java
@@ -41,7 +41,6 @@ public class DefaultIssueBuilder implements Issuable.IssueBuilder {
private String message;
private String severity;
private Double effortToFix;
- private String reporter;
private String assignee;
private RuleType type;
private Map<String, String> attributes;
@@ -114,9 +113,12 @@ public class DefaultIssueBuilder implements Issuable.IssueBuilder {
return this;
}
+ /**
+ * @deprecated since 5.5, manual issue feature has been dropped.
+ */
+ @Deprecated
@Override
public DefaultIssueBuilder reporter(@Nullable String s) {
- this.reporter = s;
return this;
}
@@ -157,7 +159,6 @@ public class DefaultIssueBuilder implements Issuable.IssueBuilder {
issue.setManualSeverity(false);
issue.setGap(effortToFix);
issue.setLine(line);
- issue.setReporter(reporter);
issue.setAssignee(assignee);
issue.setAttributes(attributes);
issue.setResolution(null);
diff --git a/sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueTest.java b/sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueTest.java
index a98373af68c..190c413f7b8 100644
--- a/sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueTest.java
@@ -53,7 +53,6 @@ public class DefaultIssueTest {
.setEffort(Duration.create(28800L))
.setStatus(Issue.STATUS_CLOSED)
.setResolution(Issue.RESOLUTION_FIXED)
- .setReporter("simon")
.setAssignee("julien")
.setAuthorLogin("steph")
.setChecksum("c7b5db46591806455cf082bb348631e8")
@@ -76,11 +75,10 @@ public class DefaultIssueTest {
assertThat(issue.manualSeverity()).isTrue();
assertThat(issue.message()).isEqualTo("a message");
assertThat(issue.line()).isEqualTo(7);
- assertThat(issue.effortToFix()).isEqualTo(1.2d);
- assertThat(issue.debt()).isEqualTo(Duration.create(28800L));
+ assertThat(issue.gap()).isEqualTo(1.2d);
+ assertThat(issue.effort()).isEqualTo(Duration.create(28800L));
assertThat(issue.status()).isEqualTo(Issue.STATUS_CLOSED);
assertThat(issue.resolution()).isEqualTo(Issue.RESOLUTION_FIXED);
- assertThat(issue.reporter()).isEqualTo("simon");
assertThat(issue.assignee()).isEqualTo("julien");
assertThat(issue.authorLogin()).isEqualTo("steph");
assertThat(issue.checksum()).isEqualTo("c7b5db46591806455cf082bb348631e8");
@@ -173,7 +171,7 @@ public class DefaultIssueTest {
@Test
public void test_nullable_fields() throws Exception {
issue.setGap(null).setSeverity(null).setLine(null);
- assertThat(issue.effortToFix()).isNull();
+ assertThat(issue.gap()).isNull();
assertThat(issue.severity()).isNull();
assertThat(issue.line()).isNull();
}