Skip to content
Snippets Groups Projects
Commit 867fe5f0 authored by uhensler's avatar uhensler
Browse files

OO-4141: Do not use statistics without key if calculate max count value

parent 5fc94475
No related branches found
No related tags found
No related merge requests found
...@@ -81,14 +81,16 @@ public class HeatMapController extends GroupByController { ...@@ -81,14 +81,16 @@ public class HeatMapController extends GroupByController {
} }
private int getMaxCount() { private int getMaxCount() {
long maxCount = 0; long tempMaxCount = 0;
for (GroupedStatistic statistic : statistics.getStatistics()) { for (GroupedStatistic statistic : statistics.getStatistics()) {
Long count = statistic.getCount(); if (!MultiKey.none().equals(statistic.getMultiKey())) {
if (count > maxCount) { Long count = statistic.getCount();
maxCount = count; if (count > tempMaxCount) {
tempMaxCount = count;
}
} }
} }
return Long.valueOf(maxCount).intValue(); return Long.valueOf(tempMaxCount).intValue();
} }
@Override @Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment