avoid duplicate puts
This commit is contained in:
parent
627cda88d2
commit
76a3f03ebf
1 changed files with 3 additions and 1 deletions
|
@ -119,7 +119,9 @@ public class RegionAddressRepositoryBinary implements RegionAddressRepository {
|
|||
|
||||
@Override
|
||||
public synchronized void addCityToPreloadedList(City city) {
|
||||
cities.put(city.getId(), city);
|
||||
if (!cities.containsKey(id)) {
|
||||
cities.put(city.getId(), city);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue