Commit b43bf0e2 authored by Matija Obreza's avatar Matija Obreza
Browse files

Country data sources are not required

parent f1d239fa
......@@ -65,10 +65,10 @@ public class GeoServiceImpl implements GeoService {
@Autowired
ITPGRFAStatusRepository itpgrfaRepository;
@Autowired
@Autowired(required = false)
private GeoNamesCountrySource geoNamesCountrySource;
@Autowired
@Autowired(required = false)
private DavrosCountrySource davrosCountrySource;
@Override
......@@ -216,6 +216,11 @@ public class GeoServiceImpl implements GeoService {
}
private void updateDavrosCountries() throws IOException {
if (davrosCountrySource == null) {
LOG.warn("davros.org contry source not available");
return;
}
final List<CountryInfo> countries = davrosCountrySource.fetchCountryData();
if (LOG.isDebugEnabled()) {
......@@ -278,6 +283,11 @@ public class GeoServiceImpl implements GeoService {
}
private void updateGeoNamesCountries() throws IOException {
if (geoNamesCountrySource == null) {
LOG.warn("geonames.org contry source not available");
return;
}
final List<CountryInfo> countries = geoNamesCountrySource.fetchCountryData();
if (LOG.isDebugEnabled()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment