mirror of
https://github.com/correl/mage.git
synced 2024-12-25 19:25:41 +00:00
commit
8a7de69948
1 changed files with 6 additions and 2 deletions
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue