aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueHandlers.java4
-rw-r--r--plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueTracking.java2
-rw-r--r--plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/IssueTrackingTest.java4
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/issue/DeprecatedViolations.java2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/report/SonarReport.java4
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/report/SonarReportTest.java10
-rw-r--r--sonar-core/src/main/java/org/sonar/core/issue/DefaultIssue.java10
-rw-r--r--sonar-core/src/main/java/org/sonar/core/issue/DefaultIssueBuilder.java17
-rw-r--r--sonar-core/src/main/java/org/sonar/core/issue/IssueUpdater.java4
-rw-r--r--sonar-core/src/main/java/org/sonar/core/issue/db/IssueDto.java14
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/issue/db/IssueMapper.xml12
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl2
-rw-r--r--sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueBuilderTest.java4
-rw-r--r--sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueTest.java18
-rw-r--r--sonar-core/src/test/java/org/sonar/core/issue/db/IssueDaoTest.java2
-rw-r--r--sonar-core/src/test/java/org/sonar/core/issue/db/IssueDtoTest.java4
-rw-r--r--sonar-core/src/test/java/org/sonar/core/issue/db/IssueMapperTest.java4
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/ActionPlanStatsDaoTest/should_find_by_project.xml6
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_all.xml6
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_action_plans.xml6
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_assigned.xml6
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_component_root.xml4
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_date_creation.xml4
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_ids.xml6
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_key.xml2
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_planned.xml6
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_query.xml2
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_resolved.xml6
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_rules.xml6
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_issue_and_component_ids.xml6
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_open_issues.xml6
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result.xml6
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testInsert-result.xml2
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testUpdate-result.xml2
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testUpdate.xml2
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_insert_new_issues-result.xml2
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_update_issues-result.xml2
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_update_issues.xml2
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/persistence/DryRunDatabaseFactoryTest/should_create_database_with_issues.xml4
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteResource.xml2
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteProject.xml8
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/issue/Issuable.java6
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/issue/Issue.java5
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueHandler.java10
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueQuery.java2
-rw-r--r--sonar-server/src/main/java/org/sonar/server/issue/InternalRubyIssueService.java3
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/models/issue.rb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/395_create_issues.rb2
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issue.java10
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueParserTest.java2
-rw-r--r--sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/search.json2
51 files changed, 142 insertions, 123 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueHandlers.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueHandlers.java
index ef60b59c944..3a752f8d4d9 100644
--- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueHandlers.java
+++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueHandlers.java
@@ -84,8 +84,8 @@ public class IssueHandlers implements BatchExtension {
}
@Override
- public IssueHandler.Context setDescription(@Nullable String description) {
- updater.setDescription(issue, description);
+ public IssueHandler.Context setMessage(@Nullable String s) {
+ updater.setMessage(issue, s);
return this;
}
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueTracking.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueTracking.java
index e0538e3f713..c4ab555d068 100644
--- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueTracking.java
+++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueTracking.java
@@ -337,7 +337,7 @@ public class IssueTracking implements BatchExtension {
}
private boolean isSameMessage(DefaultIssue newIssue, IssueDto pastIssue) {
- return Objects.equal(newIssue.description(), pastIssue.getDescription());
+ return Objects.equal(newIssue.message(), pastIssue.getMessage());
}
private boolean isSameKey(DefaultIssue newIssue, IssueDto pastIssue) {
diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/IssueTrackingTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/IssueTrackingTest.java
index 61f105a4e5e..9a81055c54a 100644
--- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/IssueTrackingTest.java
+++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/IssueTrackingTest.java
@@ -380,7 +380,7 @@ public class IssueTrackingTest {
}
private DefaultIssue newDefaultIssue(String message, Integer line, RuleKey ruleKey, String checksum) {
- return new DefaultIssue().setDescription(message).setLine(line).setRuleKey(ruleKey).setChecksum(checksum).setStatus(Issue.STATUS_OPEN);
+ return new DefaultIssue().setMessage(message).setLine(line).setRuleKey(ruleKey).setChecksum(checksum).setStatus(Issue.STATUS_OPEN);
}
private IssueDto newReferenceIssue(String message, Integer lineId, int ruleId, String lineChecksum) {
@@ -389,7 +389,7 @@ public class IssueTrackingTest {
referenceIssue.setId(id);
referenceIssue.setKee(Long.toString(id));
referenceIssue.setLine(lineId);
- referenceIssue.setDescription(message);
+ referenceIssue.setMessage(message);
referenceIssue.setRuleId(ruleId);
referenceIssue.setChecksum(lineChecksum);
referenceIssue.setResolution(null);
diff --git a/sonar-batch/src/main/java/org/sonar/batch/issue/DeprecatedViolations.java b/sonar-batch/src/main/java/org/sonar/batch/issue/DeprecatedViolations.java
index d0db555891a..adb81f8967b 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/issue/DeprecatedViolations.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/issue/DeprecatedViolations.java
@@ -54,7 +54,7 @@ public class DeprecatedViolations implements BatchComponent {
.ruleKey(RuleKey.of(violation.getRule().getRepositoryKey(), violation.getRule().getKey()))
.effortToFix(violation.getCost())
.line(violation.getLineId())
- .description(violation.getMessage())
+ .message(violation.getMessage())
.severity(violation.getSeverity() != null ? violation.getSeverity().name() : Severity.MAJOR)
.build();
}
diff --git a/sonar-batch/src/main/java/org/sonar/batch/report/SonarReport.java b/sonar-batch/src/main/java/org/sonar/batch/report/SonarReport.java
index dc706c58036..f02a8c466be 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/report/SonarReport.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/report/SonarReport.java
@@ -110,13 +110,15 @@ public class SonarReport implements BatchComponent {
put(jsonIssue, "key", issue.key());
put(jsonIssue, "component", issue.componentKey());
put(jsonIssue, "line", issue.line());
- put(jsonIssue, "description", issue.description());
+ put(jsonIssue, "message", issue.message());
put(jsonIssue, "severity", issue.severity());
put(jsonIssue, "rule", issue.ruleKey());
put(jsonIssue, "status", issue.status());
put(jsonIssue, "resolution", issue.resolution());
put(jsonIssue, "isNew", issue.isNew());
+ put(jsonIssue, "reporter", issue.reporter());
put(jsonIssue, "assignee", issue.assignee());
+ put(jsonIssue, "effortToFix", issue.effortToFix());
put(jsonIssue, "creationDate", issue.creationDate());
put(jsonIssue, "updateDate", issue.updateDate());
put(jsonIssue, "closeDate", issue.closeDate());
diff --git a/sonar-batch/src/test/java/org/sonar/batch/report/SonarReportTest.java b/sonar-batch/src/test/java/org/sonar/batch/report/SonarReportTest.java
index 97f2ea77449..55253b35fb6 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/report/SonarReportTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/report/SonarReportTest.java
@@ -126,11 +126,13 @@ public class SonarReportTest {
DefaultIssue issue = new DefaultIssue()
.setKey("200")
.setComponentKey("Action.java")
- .setDescription("SystemPrintln")
+ .setMessage("SystemPrintln")
.setSeverity("MINOR")
.setStatus(Issue.STATUS_CLOSED)
.setResolution(Issue.RESOLUTION_FALSE_POSITIVE)
.setLine(1)
+ .setEffortToFix(3.14)
+ .setReporter("julien")
.setAssignee("simon")
.setRuleKey(RuleKey.of("squid", "AvoidCycle"))
.setCreationDate(DateUtils.parseDate("2013-04-24"))
@@ -145,17 +147,19 @@ public class SonarReportTest {
JSONArray issues = (JSONArray) json.get("issues");
assertThat(issues).hasSize(1);
JSONObject jsonIssue = (JSONObject) issues.get(0);
- assertThat(jsonIssue.values()).hasSize(13);
+ assertThat(jsonIssue.values()).hasSize(15);
assertThat(jsonIssue.get("key")).isEqualTo("200");
assertThat(jsonIssue.get("component")).isEqualTo("Action.java");
assertThat(jsonIssue.get("line")).isEqualTo(1);
- assertThat(jsonIssue.get("description")).isEqualTo("SystemPrintln");
+ assertThat(jsonIssue.get("message")).isEqualTo("SystemPrintln");
assertThat(jsonIssue.get("severity")).isEqualTo("MINOR");
assertThat(jsonIssue.get("rule")).isEqualTo("squid:AvoidCycle");
assertThat(jsonIssue.get("status")).isEqualTo("CLOSED");
assertThat(jsonIssue.get("resolution")).isEqualTo("FALSE-POSITIVE");
assertThat(jsonIssue.get("assignee")).isEqualTo("simon");
+ assertThat(jsonIssue.get("effortToFix")).isEqualTo(3.14);
+ assertThat(jsonIssue.get("reporter")).isEqualTo("julien");
assertThat(jsonIssue.get("isNew")).isEqualTo(false);
assertThat((String) jsonIssue.get("creationDate")).contains("2013-04-24T00:00");
assertThat((String) jsonIssue.get("updateDate")).contains("2013-04-25T00:00");
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 a3e659e8672..a2f64c12efb 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
@@ -49,7 +49,7 @@ public class DefaultIssue implements Issue {
private RuleKey ruleKey;
private String severity;
private boolean manualSeverity = false;
- private String description;
+ private String message;
private Integer line;
private Double effortToFix;
private String status;
@@ -121,12 +121,12 @@ public class DefaultIssue implements Issue {
}
@CheckForNull
- public String description() {
- return description;
+ public String message() {
+ return message;
}
- public DefaultIssue setDescription(@Nullable String s) {
- this.description = StringUtils.abbreviate(StringUtils.trim(s), DESCRIPTION_MAX_SIZE);
+ public DefaultIssue setMessage(@Nullable String s) {
+ this.message = StringUtils.abbreviate(StringUtils.trim(s), MESSAGE_MAX_SIZE);
return this;
}
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 c851d61b0b5..95d62e0d048 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
@@ -38,11 +38,11 @@ public class DefaultIssueBuilder implements Issuable.IssueBuilder {
private String componentKey;
private RuleKey ruleKey;
private Integer line;
- private String description;
+ private String message;
private String severity;
private Double effortToFix;
- private boolean manual = false;
private Date createdDate;
+ private String reporter;
private Map<String, String> attributes;
public DefaultIssueBuilder() {
@@ -72,8 +72,8 @@ public class DefaultIssueBuilder implements Issuable.IssueBuilder {
}
@Override
- public Issuable.IssueBuilder description(String s) {
- this.description = s;
+ public Issuable.IssueBuilder message(@Nullable String s) {
+ this.message = s;
return this;
}
@@ -90,8 +90,8 @@ public class DefaultIssueBuilder implements Issuable.IssueBuilder {
}
@Override
- public Issuable.IssueBuilder manual(boolean b) {
- this.manual = b;
+ public Issuable.IssueBuilder reporter(@Nullable String s) {
+ this.reporter = s;
return this;
}
@@ -122,11 +122,12 @@ public class DefaultIssueBuilder implements Issuable.IssueBuilder {
issue.setUpdateDate(date);
issue.setComponentKey(componentKey);
issue.setRuleKey(ruleKey);
- issue.setDescription(description);
+ issue.setMessage(message);
issue.setSeverity(Objects.firstNonNull(severity, Severity.MAJOR));
issue.setEffortToFix(effortToFix);
issue.setLine(line);
- issue.setManualSeverity(manual);
+ issue.setManualSeverity(false);
+ issue.setReporter(reporter);
issue.setAttributes(attributes);
issue.setNew(true);
issue.setAlive(true);
diff --git a/sonar-core/src/main/java/org/sonar/core/issue/IssueUpdater.java b/sonar-core/src/main/java/org/sonar/core/issue/IssueUpdater.java
index 90da11f6076..6d2444cb7df 100644
--- a/sonar-core/src/main/java/org/sonar/core/issue/IssueUpdater.java
+++ b/sonar-core/src/main/java/org/sonar/core/issue/IssueUpdater.java
@@ -95,8 +95,8 @@ public class IssueUpdater implements BatchComponent, ServerComponent {
issue.setAuthorLogin(authorLogin);
}
- public void setDescription(DefaultIssue issue, @Nullable String description) {
- issue.setDescription(description);
+ public void setMessage(DefaultIssue issue, @Nullable String s) {
+ issue.setMessage(s);
}
public void addComment(DefaultIssue issue, String text, IssueChangeContext context) {
diff --git a/sonar-core/src/main/java/org/sonar/core/issue/db/IssueDto.java b/sonar-core/src/main/java/org/sonar/core/issue/db/IssueDto.java
index 2d918a8a80a..f31e977f6aa 100644
--- a/sonar-core/src/main/java/org/sonar/core/issue/db/IssueDto.java
+++ b/sonar-core/src/main/java/org/sonar/core/issue/db/IssueDto.java
@@ -42,7 +42,7 @@ public final class IssueDto {
private Integer ruleId;
private String severity;
private boolean manualSeverity;
- private String description;
+ private String message;
private Integer line;
private Double effortToFix;
private String status;
@@ -134,12 +134,12 @@ public final class IssueDto {
}
@CheckForNull
- public String getDescription() {
- return description;
+ public String getMessage() {
+ return message;
}
- public IssueDto setDescription(@Nullable String s) {
- this.description = s;
+ public IssueDto setMessage(@Nullable String s) {
+ this.message = s;
return this;
}
@@ -314,7 +314,7 @@ public final class IssueDto {
return new IssueDto()
.setKee(issue.key())
.setLine(issue.line())
- .setDescription(issue.description())
+ .setMessage(issue.message())
.setEffortToFix(issue.effortToFix())
.setResolution(issue.resolution())
.setStatus(issue.status())
@@ -340,7 +340,7 @@ public final class IssueDto {
issue.setKey(kee);
issue.setStatus(status);
issue.setResolution(resolution);
- issue.setDescription(description);
+ issue.setMessage(message);
issue.setEffortToFix(effortToFix);
issue.setLine(line);
issue.setSeverity(severity);
diff --git a/sonar-core/src/main/resources/org/sonar/core/issue/db/IssueMapper.xml b/sonar-core/src/main/resources/org/sonar/core/issue/db/IssueMapper.xml
index 5027df2b91c..e0e2c0f64af 100644
--- a/sonar-core/src/main/resources/org/sonar/core/issue/db/IssueMapper.xml
+++ b/sonar-core/src/main/resources/org/sonar/core/issue/db/IssueMapper.xml
@@ -12,7 +12,7 @@
i.action_plan_key as actionPlanKey,
i.severity as severity,
i.manual_severity as manualSeverity,
- i.description as description,
+ i.message as message,
i.line as line,
i.effort_to_fix as effortToFix,
i.status as status,
@@ -34,11 +34,11 @@
<insert id="insert" parameterType="Issue" useGeneratedKeys="false" keyProperty="id">
INSERT INTO issues (kee, resource_id, rule_id, action_plan_key, severity, manual_severity,
- description, line, effort_to_fix, status,
+ message, line, effort_to_fix, status,
resolution, checksum, reporter, assignee, author_login, attributes, issue_creation_date, issue_update_date,
issue_close_date, created_at, updated_at)
VALUES (#{kee}, #{resourceId}, #{ruleId}, #{actionPlanKey}, #{severity}, #{manualSeverity},
- #{description}, #{line}, #{effortToFix}, #{status},
+ #{message}, #{line}, #{effortToFix}, #{status},
#{resolution}, #{checksum}, #{reporter}, #{assignee}, #{authorLogin}, #{attributes}, #{issueCreationDate},
#{issueUpdateDate}, #{issueCloseDate}, #{createdAt}, #{updatedAt})
</insert>
@@ -50,11 +50,11 @@
select issues_seq.NEXTVAL from DUAL
</selectKey>
INSERT INTO issues (id, kee, resource_id, rule_id, action_plan_key, severity, manual_severity,
- description, line, effort_to_fix, status,
+ message, line, effort_to_fix, status,
resolution, checksum, reporter, assignee, author_login, attributes, issue_creation_date, issue_update_date,
issue_close_date, created_at, updated_at)
VALUES (#{id}, #{kee}, #{resourceId}, #{ruleId}, #{actionPlanKey}, #{severity}, #{manualSeverity},
- #{description}, #{line}, #{effortToFix}, #{status},
+ #{message}, #{line}, #{effortToFix}, #{status},
#{resolution}, #{checksum}, #{reporter}, #{assignee}, #{authorLogin}, #{attributes}, #{issueCreationDate},
#{issueUpdateDate}, #{issueCloseDate}, #{createdAt}, #{updatedAt})
</insert>
@@ -66,7 +66,7 @@
action_plan_key=#{actionPlanKey},
severity=#{severity},
manual_severity=#{manualSeverity},
- description=#{description},
+ message=#{message},
line=#{line},
effort_to_fix=#{effortToFix},
status=#{status},
diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl
index d78553ed60f..7f7a5f2d8e2 100644
--- a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl
+++ b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl
@@ -523,7 +523,7 @@ CREATE TABLE "ISSUES" (
"RULE_ID" INTEGER,
"SEVERITY" VARCHAR(10),
"MANUAL_SEVERITY" BOOLEAN NOT NULL,
- "DESCRIPTION" VARCHAR(4000),
+ "MESSAGE" VARCHAR(4000),
"LINE" INTEGER,
"EFFORT_TO_FIX" DOUBLE,
"STATUS" VARCHAR(20),
diff --git a/sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueBuilderTest.java b/sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueBuilderTest.java
index e3bced3d361..5bdfdf1bee5 100644
--- a/sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueBuilderTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueBuilderTest.java
@@ -33,7 +33,7 @@ public class DefaultIssueBuilderTest {
String componentKey = "org.apache.struts:struts-core:Action.java";
DefaultIssue issue = (DefaultIssue) new DefaultIssueBuilder()
.componentKey(componentKey)
- .description("the desc")
+ .message("the message")
.line(123)
.effortToFix(10000.0)
.ruleKey(RuleKey.of("squid", "NullDereference"))
@@ -46,7 +46,7 @@ public class DefaultIssueBuilderTest {
assertThat(issue.key()).isNotNull();
assertThat(issue.effortToFix()).isEqualTo(10000.0);
assertThat(issue.componentKey()).isEqualTo(componentKey);
- assertThat(issue.description()).isEqualTo("the desc");
+ assertThat(issue.message()).isEqualTo("the message");
assertThat(issue.line()).isEqualTo(123);
assertThat(issue.ruleKey().repository()).isEqualTo("squid");
assertThat(issue.ruleKey().rule()).isEqualTo("NullDereference");
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 23bf9b5a6a8..3801d70d743 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
@@ -77,20 +77,20 @@ public class DefaultIssueTest {
}
@Test
- public void description_should_be_abbreviated_if_too_long() {
- issue.setDescription(StringUtils.repeat("a", 5000));
- assertThat(issue.description()).hasSize(4000);
+ public void message_should_be_abbreviated_if_too_long() {
+ issue.setMessage(StringUtils.repeat("a", 5000));
+ assertThat(issue.message()).hasSize(4000);
}
@Test
- public void description_should_be_trimmed() {
- issue.setDescription(" foo ");
- assertThat(issue.description()).isEqualTo("foo");
+ public void message_should_be_trimmed() {
+ issue.setMessage(" foo ");
+ assertThat(issue.message()).isEqualTo("foo");
}
@Test
- public void description_could_be_null() {
- issue.setDescription(null);
- assertThat(issue.description()).isNull();
+ public void message_could_be_null() {
+ issue.setMessage(null);
+ assertThat(issue.message()).isNull();
}
}
diff --git a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDaoTest.java b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDaoTest.java
index d07c7a04a7e..1ac718d52cb 100644
--- a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDaoTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDaoTest.java
@@ -54,7 +54,7 @@ public class IssueDaoTest extends AbstractDaoTestCase {
assertThat(issue.getRuleId()).isEqualTo(500);
assertThat(issue.getSeverity()).isEqualTo("BLOCKER");
assertThat(issue.isManualSeverity()).isFalse();
- assertThat(issue.getDescription()).isNull();
+ assertThat(issue.getMessage()).isNull();
assertThat(issue.getLine()).isEqualTo(200);
assertThat(issue.getEffortToFix()).isEqualTo(4.2);
assertThat(issue.getStatus()).isEqualTo("OPEN");
diff --git a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDtoTest.java b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDtoTest.java
index a40e0f97dec..9598b8c796d 100644
--- a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDtoTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDtoTest.java
@@ -64,7 +64,7 @@ public class IssueDtoTest {
.setEffortToFix(15.0)
.setLine(6)
.setSeverity("BLOCKER")
- .setDescription("message")
+ .setMessage("message")
.setManualSeverity(true)
.setReporter("arthur")
.setAssignee("perceval")
@@ -83,7 +83,7 @@ public class IssueDtoTest {
assertThat(issue.effortToFix()).isEqualTo(15.0);
assertThat(issue.line()).isEqualTo(6);
assertThat(issue.severity()).isEqualTo("BLOCKER");
- assertThat(issue.description()).isEqualTo("message");
+ assertThat(issue.message()).isEqualTo("message");
assertThat(issue.manualSeverity()).isTrue();
assertThat(issue.reporter()).isEqualTo("arthur");
assertThat(issue.assignee()).isEqualTo("perceval");
diff --git a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueMapperTest.java b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueMapperTest.java
index 1137a60af33..d606a87080d 100644
--- a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueMapperTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueMapperTest.java
@@ -53,7 +53,7 @@ public class IssueMapperTest extends AbstractDaoTestCase {
dto.setActionPlanKey("current_sprint");
dto.setAttributes("JIRA=FOO-1234");
dto.setChecksum("123456789");
- dto.setDescription("the description");
+ dto.setMessage("the message");
dto.setIssueCreationDate(DateUtils.parseDate("2013-05-18"));
dto.setIssueUpdateDate(DateUtils.parseDate("2013-05-19"));
@@ -86,7 +86,7 @@ public class IssueMapperTest extends AbstractDaoTestCase {
dto.setActionPlanKey("current_sprint");
dto.setAttributes("JIRA=FOO-1234");
dto.setChecksum("123456789");
- dto.setDescription("the description");
+ dto.setMessage("the message");
dto.setIssueCreationDate(DateUtils.parseDate("2013-05-18"));
dto.setIssueUpdateDate(DateUtils.parseDate("2013-05-19"));
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/ActionPlanStatsDaoTest/should_find_by_project.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/ActionPlanStatsDaoTest/should_find_by_project.xml
index d5ce9ef3842..f960ecd1b62 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/ActionPlanStatsDaoTest/should_find_by_project.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/ActionPlanStatsDaoTest/should_find_by_project.xml
@@ -10,7 +10,7 @@
rule_id="500"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
status="OPEN"
resolution="[null]"
@@ -34,7 +34,7 @@
rule_id="500"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
status="CLOSED"
resolution="FIXED"
@@ -58,7 +58,7 @@
rule_id="500"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
status="CLOSED"
resolution="FIXED"
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_all.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_all.xml
index 24ff8a4b5e6..3d7bd96af21 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_all.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_all.xml
@@ -8,7 +8,7 @@
rule_id="500"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
@@ -32,7 +32,7 @@
rule_id="500"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
@@ -58,7 +58,7 @@
rule_id="501"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_action_plans.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_action_plans.xml
index b0414484987..5655372b58e 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_action_plans.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_action_plans.xml
@@ -8,7 +8,7 @@
action_plan_key="ABC"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
@@ -33,7 +33,7 @@
action_plan_key="ABC"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
@@ -59,7 +59,7 @@
action_plan_key="DEF"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_assigned.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_assigned.xml
index fc0e605e452..f25c1c9e8ea 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_assigned.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_assigned.xml
@@ -8,7 +8,7 @@
rule_id="500"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
@@ -32,7 +32,7 @@
rule_id="500"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
@@ -58,7 +58,7 @@
rule_id="501"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_component_root.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_component_root.xml
index a43a90b0d47..34f07c20209 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_component_root.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_component_root.xml
@@ -7,7 +7,7 @@
rule_id="500"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="[null]"
status="OPEN"
@@ -31,7 +31,7 @@
rule_id="501"
severity="MAJOR"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="120"
effort_to_fix="[null]"
status="CLOSED"
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_date_creation.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_date_creation.xml
index 1a297848923..9b6f20c96ca 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_date_creation.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_date_creation.xml
@@ -7,7 +7,7 @@
rule_id="500"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
@@ -31,7 +31,7 @@
rule_id="500"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_ids.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_ids.xml
index 4482d66dfe5..d2804c856d3 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_ids.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_ids.xml
@@ -8,7 +8,7 @@
rule_id="500"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
@@ -32,7 +32,7 @@
rule_id="500"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
@@ -58,7 +58,7 @@
rule_id="501"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_key.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_key.xml
index eab42be2c70..d01f5342d87 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_key.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_key.xml
@@ -7,7 +7,7 @@
rule_id="500"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_planned.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_planned.xml
index 5efa836cf16..ded6b072043 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_planned.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_planned.xml
@@ -8,7 +8,7 @@
action_plan_key="ABC"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
@@ -33,7 +33,7 @@
action_plan_key="ABC"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
@@ -59,7 +59,7 @@
action_plan_key="[null]"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_query.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_query.xml
index 1c876c79d76..816742b954b 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_query.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_query.xml
@@ -7,7 +7,7 @@
rule_id="500"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_resolved.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_resolved.xml
index 3eeccd3a251..371d3da3f4f 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_resolved.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_resolved.xml
@@ -7,7 +7,7 @@
rule_id="500"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
@@ -31,7 +31,7 @@
rule_id="500"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="RESOLVED"
@@ -55,7 +55,7 @@
rule_id="501"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="CLOSED"
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_rules.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_rules.xml
index 805b5d703c4..d2af6661a9e 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_rules.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_rules.xml
@@ -8,7 +8,7 @@
rule_id="500"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
@@ -32,7 +32,7 @@
rule_id="500"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
@@ -58,7 +58,7 @@
rule_id="501"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_issue_and_component_ids.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_issue_and_component_ids.xml
index 24ff8a4b5e6..3d7bd96af21 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_issue_and_component_ids.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_issue_and_component_ids.xml
@@ -8,7 +8,7 @@
rule_id="500"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
@@ -32,7 +32,7 @@
rule_id="500"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
@@ -58,7 +58,7 @@
rule_id="501"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_open_issues.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_open_issues.xml
index f08fa7766c6..12f7036120e 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_open_issues.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_open_issues.xml
@@ -7,7 +7,7 @@
rule_id="500"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="[null]"
status="OPEN"
@@ -31,7 +31,7 @@
rule_id="501"
severity="MAJOR"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="120"
effort_to_fix="[null]"
status="OPEN"
@@ -55,7 +55,7 @@
rule_id="501"
severity="MAJOR"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="120"
effort_to_fix="[null]"
status="CLOSED"
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result.xml
index 87bf002da47..41a97ef98b8 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result.xml
@@ -8,7 +8,7 @@
rule_id="500"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
@@ -32,7 +32,7 @@
rule_id="500"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
@@ -58,7 +58,7 @@
rule_id="501"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="4.2"
status="OPEN"
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testInsert-result.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testInsert-result.xml
index 4f7105aca6e..69e5160f962 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testInsert-result.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testInsert-result.xml
@@ -6,7 +6,7 @@
rule_id="200"
severity="BLOCKER"
manual_severity="[false]"
- description="the description"
+ message="the message"
line="500"
effort_to_fix="3.14"
status="RESOLVED"
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testUpdate-result.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testUpdate-result.xml
index 792d428ee5e..67d9024f5c7 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testUpdate-result.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testUpdate-result.xml
@@ -25,7 +25,7 @@
rule_id="200"
severity="BLOCKER"
manual_severity="[false]"
- description="the description"
+ message="the message"
line="500"
effort_to_fix="3.14"
status="RESOLVED"
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testUpdate.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testUpdate.xml
index fbae0e482a6..06ee1af1b50 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testUpdate.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testUpdate.xml
@@ -25,7 +25,7 @@
rule_id="200"
severity="INFO"
manual_severity="[false]"
- description="old"
+ message="old"
line="[null]"
effort_to_fix="[null]"
status="OPEN"
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_insert_new_issues-result.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_insert_new_issues-result.xml
index 34b9088daae..97ca9b21656 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_insert_new_issues-result.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_insert_new_issues-result.xml
@@ -4,7 +4,7 @@
author_login="[null]"
checksum="[null]"
effort_to_fix="[null]"
- description="[null]"
+ message="[null]"
line="5000"
resource_id="100"
rule_id="200"
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_update_issues-result.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_update_issues-result.xml
index 21bda6c581b..862d14f2b75 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_update_issues-result.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_update_issues-result.xml
@@ -9,7 +9,7 @@
author_login="simon"
checksum="FFFFF"
effort_to_fix="[null]"
- description="[null]"
+ message="[null]"
line="5000"
resource_id="100"
rule_id="200"
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_update_issues.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_update_issues.xml
index 2003f24b0b9..4d8e2449c57 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_update_issues.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_update_issues.xml
@@ -9,7 +9,7 @@
author_login="simon"
checksum="FFFFF"
effort_to_fix="[null]"
- description="[null]"
+ message="[null]"
line="3000"
resource_id="100"
rule_id="200"
diff --git a/sonar-core/src/test/resources/org/sonar/core/persistence/DryRunDatabaseFactoryTest/should_create_database_with_issues.xml b/sonar-core/src/test/resources/org/sonar/core/persistence/DryRunDatabaseFactoryTest/should_create_database_with_issues.xml
index 1077aefc797..5bf87b320ac 100644
--- a/sonar-core/src/test/resources/org/sonar/core/persistence/DryRunDatabaseFactoryTest/should_create_database_with_issues.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/persistence/DryRunDatabaseFactoryTest/should_create_database_with_issues.xml
@@ -25,7 +25,7 @@
rule_id="500"
severity="BLOCKER"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="200"
effort_to_fix="[null]"
status="OPEN"
@@ -49,7 +49,7 @@
rule_id="501"
severity="MAJOR"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
line="120"
effort_to_fix="[null]"
status="CLOSED"
diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteResource.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteResource.xml
index 959e26efeed..e8a31f031de 100644
--- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteResource.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteResource.xml
@@ -27,7 +27,7 @@
<issues id="1" kee="ABCDE" resource_id="1" status="CLOSED" resolution="[null]" line="200" severity="BLOCKER"
reporter="perceval" assignee="arthur" rule_id="500"
manual_severity="[false]"
- description="[null]"
+ message="[null]"
issue_creation_date="2013-04-16"
issue_update_date="2013-04-16"
issue_close_date="2013-04-16"
diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteProject.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteProject.xml
index 725b7aaf0c9..5c57259dab6 100644
--- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteProject.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteProject.xml
@@ -33,7 +33,9 @@
<issues id="1" kee="ABCDE" resource_id="1" status="CLOSED" resolution="[null]" line="200" severity="BLOCKER"
reporter="perceval" assignee="arthur" rule_id="500"
- manual_severity="[false]" description="[null]" action_plan_key="[null]"
+ manual_severity="[false]"
+ message="[null]"
+ action_plan_key="[null]"
created_at="[null]"
updated_at="[null]"
issue_creation_date="2013-04-16"
@@ -43,7 +45,9 @@
<issues id="2" kee="ABCDF" resource_id="1" status="CLOSED" resolution="[null]" line="200" severity="BLOCKER"
reporter="perceval" assignee="arthur" rule_id="500"
- manual_severity="[false]" description="[null]" action_plan_key="[null]"
+ manual_severity="[false]"
+ message="[null]"
+ action_plan_key="[null]"
created_at="[null]"
updated_at="[null]"
issue_creation_date="2013-04-16"
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/issue/Issuable.java b/sonar-plugin-api/src/main/java/org/sonar/api/issue/Issuable.java
index c2390849ebf..3dd8d741262 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/issue/Issuable.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/issue/Issuable.java
@@ -36,13 +36,13 @@ public interface Issuable extends Perspective {
IssueBuilder line(@Nullable Integer line);
- IssueBuilder description(String description);
+ IssueBuilder message(@Nullable String message);
IssueBuilder severity(String severity);
- IssueBuilder effortToFix(@Nullable Double d);
+ IssueBuilder reporter(String reporter);
- IssueBuilder manual(boolean b);
+ IssueBuilder effortToFix(@Nullable Double d);
IssueBuilder attribute(String key, @Nullable String value);
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/issue/Issue.java b/sonar-plugin-api/src/main/java/org/sonar/api/issue/Issue.java
index ae18533e7b9..42a38bf4190 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/issue/Issue.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/issue/Issue.java
@@ -33,7 +33,7 @@ import java.util.Map;
*/
public interface Issue extends Serializable {
- int DESCRIPTION_MAX_SIZE = 4000;
+ int MESSAGE_MAX_SIZE = 4000;
String STATUS_OPEN = "OPEN";
String STATUS_REOPENED = "REOPENED";
@@ -54,7 +54,8 @@ public interface Issue extends Serializable {
String severity();
- String description();
+ @CheckForNull
+ String message();
@CheckForNull
Integer line();
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueHandler.java b/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueHandler.java
index c0882086d22..8835ddfba8f 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueHandler.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueHandler.java
@@ -36,15 +36,15 @@ public interface IssueHandler extends BatchExtension {
// TODO rename isClosed()
boolean isAlive();
- Context setLine(@Nullable Integer line);
+ Context setLine(@Nullable Integer i);
- Context setDescription(@Nullable String description);
+ Context setMessage(@Nullable String s);
- Context setSeverity(String severity);
+ Context setSeverity(String s);
- Context setEffortToFix(@Nullable Double effortToFix);
+ Context setEffortToFix(@Nullable Double d);
- Context setAuthorLogin(@Nullable String login);
+ Context setAuthorLogin(@Nullable String s);
Context setAttribute(String key, @Nullable String value);
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueQuery.java b/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueQuery.java
index 07e5154acd9..887d57bc0b3 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueQuery.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueQuery.java
@@ -39,7 +39,7 @@ public class IssueQuery {
public static final int MAX_ISSUE_KEYS = 500;
public static enum Sort {
- CREATION_DATE, UPDATE_DATE, CLOSE_DATE, ASSIGNEE
+ CREATION_DATE, UPDATE_DATE, CLOSE_DATE, ASSIGNEE, SEVERITY
}
private final Collection<String> issueKeys;
diff --git a/sonar-server/src/main/java/org/sonar/server/issue/InternalRubyIssueService.java b/sonar-server/src/main/java/org/sonar/server/issue/InternalRubyIssueService.java
index f01dff84114..ec1c1f56e31 100644
--- a/sonar-server/src/main/java/org/sonar/server/issue/InternalRubyIssueService.java
+++ b/sonar-server/src/main/java/org/sonar/server/issue/InternalRubyIssueService.java
@@ -103,13 +103,12 @@ public class InternalRubyIssueService implements ServerComponent {
DefaultIssueBuilder builder = new DefaultIssueBuilder().componentKey(componentKey);
String line = parameters.get("line");
builder.line(line != null ? Integer.parseInt(line) : null);
- builder.description(parameters.get("description"));
+ builder.message(parameters.get("message"));
builder.severity(parameters.get("severity"));
String effortToFix = parameters.get("effortToFix");
builder.effortToFix(effortToFix != null ? Double.parseDouble(effortToFix) : null);
// TODO verify existence of rule
builder.ruleKey(RuleKey.parse(parameters.get("rule")));
- builder.manual(true);
Issue issue = builder.build();
return issueService.create((DefaultIssue) issue, UserSession.get());
}
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/issue.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/issue.rb
index c5264c589e8..ec614f6c39b 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/models/issue.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/models/issue.rb
@@ -29,7 +29,7 @@ class Issue
hash[:actionPlan] = issue.actionPlanKey if issue.actionPlanKey
hash[:resolution] = issue.resolution if issue.resolution
hash[:severity] = issue.severity if issue.severity
- hash[:desc] = issue.description if issue.description
+ hash[:message] = issue.message if issue.message
hash[:line] = issue.line.to_i if issue.line
hash[:effortToFix] = issue.effortToFix.to_f if issue.effortToFix
hash[:reporter] = issue.reporter if issue.reporter
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/395_create_issues.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/395_create_issues.rb
index 10d2fddfd39..f38b06a1dff 100644
--- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/395_create_issues.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/395_create_issues.rb
@@ -30,7 +30,7 @@ class CreateIssues < ActiveRecord::Migration
t.column :rule_id, :integer, :null => true
t.column :severity, :string, :null => true, :limit => 10
t.column :manual_severity, :boolean, :null => false
- t.column :description, :string, :null => true, :limit => 4000
+ t.column :message, :string, :null => true, :limit => 4000
t.column :line, :integer, :null => true
t.column :effort_to_fix, :decimal, :null => true, :precision => 30, :scale => 20
t.column :status, :string , :null => true, :limit => 20
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issue.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issue.java
index 525eeee3635..69cab8fc29c 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issue.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issue.java
@@ -54,9 +54,17 @@ public class Issue {
return JsonUtils.getString(json, "severity");
}
+ /**
+ * TODO to be removed
+ */
@CheckForNull
public String description() {
- return JsonUtils.getString(json, "desc");
+ return JsonUtils.getString(json, "message");
+ }
+
+ @CheckForNull
+ public String message() {
+ return JsonUtils.getString(json, "message");
}
@CheckForNull
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueParserTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueParserTest.java
index 8ac410e59e3..2b2cb50984b 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueParserTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueParserTest.java
@@ -45,7 +45,7 @@ public class IssueParserTest {
assertThat(first.resolution()).isEqualTo("FIXED");
assertThat(first.status()).isEqualTo("OPEN");
assertThat(first.assignee()).isEqualTo("karadoc");
- assertThat(first.description()).isEqualTo("the desc");
+ assertThat(first.message()).isEqualTo("the message");
assertThat(first.effortToFix()).isEqualTo(4.2);
assertThat(first.userLogin()).isEqualTo("perceval");
assertThat(first.creationDate()).isNotNull();
diff --git a/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/search.json b/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/search.json
index 5eda187d3db..8385fa8b09b 100644
--- a/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/search.json
+++ b/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/search.json
@@ -10,7 +10,7 @@
"status": "OPEN",
"assignee": "karadoc",
"effortToFix": 4.2,
- "desc": "the desc",
+ "message": "the message",
"title": "the title",
"reporter": "perceval",
"creationDate": "2013-05-18T12:45:34+0200",