diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2015-06-10 12:12:31 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2015-06-10 14:30:42 +0200 |
commit | 091ec857d24bfe139d2a5ce143ffc9b32b21cd7c (patch) | |
tree | 56ba97366f5fb78508fc9f39e3b4a046ab28a8c5 /sonar-batch/src/main/java/org/sonar/batch/qualitygate | |
parent | f0966d38a9046d2646291b8f94fabed4dfc9820f (diff) | |
download | sonarqube-091ec857d24bfe139d2a5ce143ffc9b32b21cd7c.tar.gz sonarqube-091ec857d24bfe139d2a5ce143ffc9b32b21cd7c.zip |
SONAR-6260 Apply PR feedback
Diffstat (limited to 'sonar-batch/src/main/java/org/sonar/batch/qualitygate')
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/qualitygate/QualityGateVerifier.java | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/qualitygate/QualityGateVerifier.java b/sonar-batch/src/main/java/org/sonar/batch/qualitygate/QualityGateVerifier.java index 5e300001222..b6f67629881 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/qualitygate/QualityGateVerifier.java +++ b/sonar-batch/src/main/java/org/sonar/batch/qualitygate/QualityGateVerifier.java @@ -42,9 +42,7 @@ import org.sonar.api.resources.Resource; import org.sonar.api.resources.ResourceUtils; import org.sonar.api.utils.Duration; import org.sonar.api.utils.Durations; -import org.sonar.batch.index.BatchComponentCache; import org.sonar.core.qualitygate.db.QualityGateConditionDto; -import org.sonar.core.timemachine.Periods; public class QualityGateVerifier implements Decorator { @@ -58,15 +56,11 @@ public class QualityGateVerifier implements Decorator { private QualityGate qualityGate; - private Periods periods; private I18n i18n; private Durations durations; - private BatchComponentCache resourceCache; - public QualityGateVerifier(QualityGate qualityGate, BatchComponentCache resourceCache, Periods periods, I18n i18n, Durations durations) { + public QualityGateVerifier(QualityGate qualityGate, I18n i18n, Durations durations) { this.qualityGate = qualityGate; - this.resourceCache = resourceCache; - this.periods = periods; this.i18n = i18n; this.durations = durations; } @@ -166,11 +160,11 @@ public class QualityGateVerifier implements Decorator { .append(" ").append(operatorLabel(condition.operator())).append(" ") .append(alertValue(condition, level)); - // Disabled because snapshot is no more created by the batch -// if (alertPeriod != null) { -// Snapshot snapshot = resourceCache.get(project).snapshot(); -// stringBuilder.append(" ").append(periods.label(snapshot, alertPeriod)); -// } + // TODO Disabled because snapshot is no more created by the batch, but should be reactivated when the decorator will be moved to the batch + // if (alertPeriod != null) { + // Snapshot snapshot = resourceCache.get(project).snapshot(); + // stringBuilder.append(" ").append(periods.label(snapshot, alertPeriod)); + // } return stringBuilder.toString(); } |