Merge pull request #2863 from ingmargoudt/master

fix counters
This commit is contained in:
ingmargoudt 2017-02-13 21:47:43 +01:00 committed by GitHub
commit 8a7de69948

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());
}
}