avoid duplicate puts

This commit is contained in:
sonora 2015-01-16 20:30:05 +01:00
parent 627cda88d2
commit 76a3f03ebf

View file

@ -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