diff options
Diffstat (limited to 'server/sonar-server-common/src')
4 files changed, 0 insertions, 21 deletions
diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/DistributedMetricStatsInt.java b/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/DistributedMetricStatsInt.java index 5502fabe524..dfd1a3847af 100644 --- a/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/DistributedMetricStatsInt.java +++ b/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/DistributedMetricStatsInt.java @@ -46,10 +46,6 @@ public class DistributedMetricStatsInt { return globalStats.getOnLeak(); } - public int getOffLeak() { - return globalStats.getOffLeak(); - } - public int getTotal() { return globalStats.getTotal(); } diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/MetricStatsInt.java b/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/MetricStatsInt.java index 7aa3582a367..e4a1698022b 100644 --- a/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/MetricStatsInt.java +++ b/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/MetricStatsInt.java @@ -36,10 +36,6 @@ public class MetricStatsInt { return onLeak; } - public int getOffLeak() { - return offLeak; - } - public int getTotal() { return onLeak + offLeak; } diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/NewIssuesStatistics.java b/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/NewIssuesStatistics.java index e2d8e81a29e..b26a2e2de84 100644 --- a/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/NewIssuesStatistics.java +++ b/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/NewIssuesStatistics.java @@ -67,10 +67,6 @@ public class NewIssuesStatistics { return globalStatistics.hasIssuesOnLeak(); } - public boolean hasIssuesOffLeak() { - return globalStatistics.hasIssuesOffLeak(); - } - public enum Metric { RULE_TYPE(true), TAG(true), COMPONENT(true), ASSIGNEE(true), EFFORT(false), RULE(true); private final boolean isComputedByDistribution; @@ -146,10 +142,6 @@ public class NewIssuesStatistics { return getDistributedMetricStats(RULE_TYPE).getOnLeak() > 0; } - public boolean hasIssuesOffLeak() { - return getDistributedMetricStats(RULE_TYPE).getOffLeak() > 0; - } - @Override public String toString() { return "Stats{" + diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/NewIssuesStatisticsTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/NewIssuesStatisticsTest.java index b318fab55f5..2f749254a7f 100644 --- a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/NewIssuesStatisticsTest.java +++ b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/NewIssuesStatisticsTest.java @@ -222,7 +222,6 @@ public class NewIssuesStatisticsTest { NewIssuesStatistics.Stats stats = underTest.getAssigneesStatistics().get(assignee); DistributedMetricStatsInt assigneeStats = stats.getDistributedMetricStats(Metric.ASSIGNEE); assertThat(assigneeStats.getOnLeak()).isEqualTo(1); - assertThat(assigneeStats.getOffLeak()).isEqualTo(0); assertThat(assigneeStats.getTotal()).isEqualTo(1); assignees.forEach(s -> { Optional<MetricStatsInt> forLabelOpts = assigneeStats.getForLabel(s); @@ -230,7 +229,6 @@ public class NewIssuesStatisticsTest { assertThat(forLabelOpts.isPresent()).isTrue(); MetricStatsInt forLabel = forLabelOpts.get(); assertThat(forLabel.getOnLeak()).isEqualTo(1); - assertThat(forLabel.getOffLeak()).isEqualTo(0); assertThat(forLabel.getTotal()).isEqualTo(1); } else { assertThat(forLabelOpts.isPresent()).isFalse(); @@ -252,7 +250,6 @@ public class NewIssuesStatisticsTest { NewIssuesStatistics.Stats stats = underTest.getAssigneesStatistics().get(assignee); DistributedMetricStatsInt assigneeStats = stats.getDistributedMetricStats(Metric.ASSIGNEE); assertThat(assigneeStats.getOnLeak()).isEqualTo(0); - assertThat(assigneeStats.getOffLeak()).isEqualTo(1); assertThat(assigneeStats.getTotal()).isEqualTo(1); assignees.forEach(s -> { Optional<MetricStatsInt> forLabelOpts = assigneeStats.getForLabel(s); @@ -260,7 +257,6 @@ public class NewIssuesStatisticsTest { assertThat(forLabelOpts.isPresent()).isTrue(); MetricStatsInt forLabel = forLabelOpts.get(); assertThat(forLabel.getOnLeak()).isEqualTo(0); - assertThat(forLabel.getOffLeak()).isEqualTo(1); assertThat(forLabel.getTotal()).isEqualTo(1); } else { assertThat(forLabelOpts.isPresent()).isFalse(); @@ -431,7 +427,6 @@ public class NewIssuesStatisticsTest { assertThat(statsOption.isPresent()).describedAs("distribution for label %s not found", label).isTrue(); MetricStatsInt stats = statsOption.get(); assertThat(stats.getOnLeak()).isEqualTo(onLeak); - assertThat(stats.getOffLeak()).isEqualTo(offLeak); assertThat(stats.getTotal()).isEqualTo(total); } |