]> source.dussan.org Git - sonarqube.git/commitdiff
Fix some quality flaws
authorJulien HENRY <julien.henry@sonarsource.com>
Thu, 13 Jun 2013 07:15:37 +0000 (09:15 +0200)
committerJulien HENRY <julien.henry@sonarsource.com>
Thu, 13 Jun 2013 07:15:37 +0000 (09:15 +0200)
sonar-batch/src/main/java/org/sonar/batch/profiling/AbstractTimeProfiling.java
sonar-batch/src/main/java/org/sonar/batch/profiling/PhasesSumUpTimeProfiler.java

index badcec28122c32a9b1980b6175651fcc74425fc4..81810cd00c30ece47abd40e6dad1b4c581e946ae 100644 (file)
@@ -21,6 +21,8 @@ package org.sonar.batch.profiling;
 
 import org.sonar.api.utils.TimeUtils;
 
+import javax.annotation.Nullable;
+
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -101,7 +103,7 @@ public abstract class AbstractTimeProfiling {
     PhasesSumUpTimeProfiler.println(msg);
   }
 
-  protected void println(String text, Double percent, AbstractTimeProfiling phaseProfiling) {
+  protected void println(String text, @Nullable Double percent, AbstractTimeProfiling phaseProfiling) {
     PhasesSumUpTimeProfiler.println(text, percent, phaseProfiling);
   }
 
index 6aebf4f1b86c71f5d7ba73185404065f14054558..e8402e2b7be1020088cd12c3272e9828897e4035 100644 (file)
@@ -40,6 +40,8 @@ import org.sonar.api.utils.TimeUtils;
 import org.sonar.batch.events.BatchStepHandler;
 import org.sonar.batch.phases.Phases;
 
+import javax.annotation.Nullable;
+
 import java.util.HashMap;
 import java.util.IdentityHashMap;
 import java.util.List;
@@ -72,7 +74,7 @@ public class PhasesSumUpTimeProfiler implements ProjectAnalysisHandler, SensorEx
     LOG.info(msg);
   }
 
-  static void println(String text, Double percent, AbstractTimeProfiling phaseProfiling) {
+  static void println(String text, @Nullable Double percent, AbstractTimeProfiling phaseProfiling) {
     StringBuilder sb = new StringBuilder();
     sb.append(StringUtils.rightPad(text, TEXT_RIGHT_PAD)).append(StringUtils.leftPad(phaseProfiling.totalTimeAsString(), TIME_LEFT_PAD));
     if (percent != null) {