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) { public void addCounter(Counter counter) {
putIfAbsent(counter.name, counter); if (!containsKey(counter.name)) {
get(counter.name).add(counter.getCount()); put(counter.name, counter);
} else {
get(counter.name).add(counter.getCount());
}
} }