aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2013-06-03 00:46:58 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2013-06-03 00:46:58 +0200
commit1f41283751271d5fc4eeac4149830800437431dd (patch)
tree8ee5395d67b039bfbc39f193e020c4a89e550c8f /sonar-core
parentf279ef14ceb725c98e1e070515fd31bb81d3ba9e (diff)
downloadsonarqube-1f41283751271d5fc4eeac4149830800437431dd.tar.gz
sonarqube-1f41283751271d5fc4eeac4149830800437431dd.zip
Fix some quality flaws
Diffstat (limited to 'sonar-core')
-rw-r--r--sonar-core/src/main/java/org/sonar/core/issue/ActionPlanStats.java3
-rw-r--r--sonar-core/src/main/java/org/sonar/core/issue/DefaultIssueBuilder.java4
2 files changed, 4 insertions, 3 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/issue/ActionPlanStats.java b/sonar-core/src/main/java/org/sonar/core/issue/ActionPlanStats.java
index 371125642c5..30f7c66c072 100644
--- a/sonar-core/src/main/java/org/sonar/core/issue/ActionPlanStats.java
+++ b/sonar-core/src/main/java/org/sonar/core/issue/ActionPlanStats.java
@@ -71,6 +71,7 @@ public class ActionPlanStats extends DefaultActionPlan {
}
public boolean overDue(){
- return isOpen() && deadLine() != null && new Date().after(deadLine());
+ Date deadline = deadLine();
+ return isOpen() && deadline != null && new Date().after(deadline);
}
}
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 be3bb84b722..a8a8c303c2f 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
@@ -71,7 +71,7 @@ public class DefaultIssueBuilder implements Issuable.IssueBuilder {
}
@Override
- public Issuable.IssueBuilder severity(String severity) {
+ public Issuable.IssueBuilder severity(@Nullable String severity) {
this.severity = severity;
return this;
}
@@ -89,7 +89,7 @@ public class DefaultIssueBuilder implements Issuable.IssueBuilder {
}
@Override
- public Issuable.IssueBuilder attribute(String key, String value) {
+ public Issuable.IssueBuilder attribute(String key, @Nullable String value) {
if (attributes == null) {
attributes = Maps.newLinkedHashMap();
}