summaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2015-02-23 21:51:43 +0100
committerSimon Brandhof <simon.brandhof@sonarsource.com>2015-02-23 21:51:43 +0100
commitec5c44dd34ba4e77d43a0f6b67c9326a38c243dc (patch)
treeab0007c9768c6f8f3550a8686e7c0d8742c7d4b5 /sonar-batch
parent1b2791924ef45c4b6a09d405deb3b1cfd5076798 (diff)
downloadsonarqube-ec5c44dd34ba4e77d43a0f6b67c9326a38c243dc.tar.gz
sonarqube-ec5c44dd34ba4e77d43a0f6b67c9326a38c243dc.zip
Fix quality flaws
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/report/IssuesPublisher.java46
1 files changed, 28 insertions, 18 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/report/IssuesPublisher.java b/sonar-batch/src/main/java/org/sonar/batch/report/IssuesPublisher.java
index a8e03ed8a4c..8be01240274 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/report/IssuesPublisher.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/report/IssuesPublisher.java
@@ -81,33 +81,43 @@ public class IssuesPublisher implements ReportPublisher {
if (message != null) {
builder.setMsg(message);
}
- if (issue.effortToFix() != null) {
- builder.setEffortToFix(issue.effortToFix());
+ Double effortToFix = issue.effortToFix();
+ if (effortToFix != null) {
+ builder.setEffortToFix(effortToFix);
}
- if (issue.debtInMinutes() != null) {
- builder.setDebtInMinutes(issue.debtInMinutes());
+
+ Long debtInMinutes = issue.debtInMinutes();
+ if (debtInMinutes != null) {
+ builder.setDebtInMinutes(debtInMinutes);
}
- if (issue.resolution() != null) {
- builder.setResolution(issue.resolution());
+ String resolution = issue.resolution();
+ if (resolution != null) {
+ builder.setResolution(resolution);
}
- if (issue.status() != null) {
- builder.setStatus(issue.status());
+ String status = issue.status();
+ if (status != null) {
+ builder.setStatus(status);
}
- if (issue.checksum() != null) {
- builder.setChecksum(issue.checksum());
+ String checksum = issue.checksum();
+ if (checksum != null) {
+ builder.setChecksum(checksum);
}
builder.setManualSeverity(issue.manualSeverity());
- if (issue.reporter() != null) {
- builder.setReporter(issue.reporter());
+ String reporter = issue.reporter();
+ if (reporter != null) {
+ builder.setReporter(reporter);
}
- if (issue.assignee() != null) {
- builder.setAssignee(issue.assignee());
+ String assignee = issue.assignee();
+ if (assignee != null) {
+ builder.setAssignee(assignee);
}
- if (issue.actionPlanKey() != null) {
- builder.setActionPlanKey(issue.actionPlanKey());
+ String actionPlanKey = issue.actionPlanKey();
+ if (actionPlanKey != null) {
+ builder.setActionPlanKey(actionPlanKey);
}
- if (issue.authorLogin() != null) {
- builder.setAuthorLogin(issue.authorLogin());
+ String authorLogin = issue.authorLogin();
+ if (authorLogin != null) {
+ builder.setAuthorLogin(authorLogin);
}
String diff = diffsToString(issue.currentChange());
if (diff != null) {