mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-02-23 07:41:19 +01:00
Added null check to GeolocationCache
- Checks against null country name Affects issues: - Close #1101
This commit is contained in:
parent
8cfbe0aa8c
commit
dfff43f917
@ -162,8 +162,9 @@ public class GeolocationCache implements SubSystem {
|
||||
|
||||
CountryResponse response = reader.country(inetAddress);
|
||||
Country country = response.getCountry();
|
||||
String countryName = country.getName();
|
||||
|
||||
return country.getName();
|
||||
return countryName != null ? countryName : "Not Known";
|
||||
}
|
||||
|
||||
} catch (IOException | GeoIp2Exception e) {
|
||||
|
Loading…
Reference in New Issue
Block a user