]> source.dussan.org Git - sonarqube.git/commitdiff
Fix quality flaws
authorJulien Lancelot <julien.lancelot@gmail.com>
Thu, 30 May 2013 12:20:44 +0000 (14:20 +0200)
committerJulien Lancelot <julien.lancelot@gmail.com>
Thu, 30 May 2013 12:20:44 +0000 (14:20 +0200)
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/CountOpenIssuesDecorator.java
sonar-batch/src/main/java/org/sonar/batch/issue/ScanIssues.java
sonar-core/src/main/java/org/sonar/core/issue/ActionPlanStats.java

index cfae7606a5fe408f19d567447275423be862ff48..aea3cd13071a863ba9c8c9c0b56fd943df466837 100644 (file)
@@ -260,7 +260,7 @@ public class CountOpenIssuesDecorator implements Decorator {
   }
 
   @VisibleForTesting
-  int countIssuesAfterDate(Collection<Issue> issues, Date targetDate) {
+  int countIssuesAfterDate(Collection<Issue> issues, @Nullable Date targetDate) {
     if (issues == null) {
       return 0;
     }
index f3da90111a147e56efb2ea091b0108e00e8ec27a..fa59a1d64c4c77b55a1dec8ead3b97e9ac74b6b1 100644 (file)
@@ -59,7 +59,6 @@ public class ScanIssues implements BatchComponent {
   private DefaultIssue newIssue(Violation violation) {
     return (DefaultIssue) new DefaultIssueBuilder()
       .componentKey(violation.getResource().getEffectiveKey())
-//      .projectKey(violation.getResource().getEffectiveKey())
       .ruleKey(RuleKey.of(violation.getRule().getRepositoryKey(), violation.getRule().getKey()))
       .effortToFix(violation.getCost())
       .line(violation.getLineId())
index a9e67fda15ee99641136b3c4466c973efc08c26a..dc42120042a4f2d2bcaf0d2f3a84dadbb85b8afa 100644 (file)
@@ -71,6 +71,6 @@ public class ActionPlanStats extends DefaultActionPlan {
   }
 
   public boolean overDue(){
-    return super.status() == ActionPlan.STATUS_OPEN && new Date().after(super.deadLine());
+    return super.status() == ActionPlan.STATUS_OPEN && super.deadLine() != null && new Date().after(super.deadLine());
   }
 }