fix counters

This commit is contained in:
ingmargoudt 2017-02-13 21:45:37 +01:00
parent 52af50f77e
commit 26e16be772

View file

@ -57,8 +57,12 @@ public class Counters extends HashMap<String, Counter> implements Serializable {
}
public void addCounter(Counter counter) {
putIfAbsent(counter.name, counter);
get(counter.name).add(counter.getCount());
if (!containsKey(counter.name)) {
put(counter.name, counter);
} else {
get(counter.name).add(counter.getCount());
}
}