diff options
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r-- | src/main/java/org/traccar/geolocation/OpenCellIdGeolocationProvider.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/geolocation/OpenCellIdGeolocationProvider.java b/src/main/java/org/traccar/geolocation/OpenCellIdGeolocationProvider.java index 88353391d..cb3094e16 100644 --- a/src/main/java/org/traccar/geolocation/OpenCellIdGeolocationProvider.java +++ b/src/main/java/org/traccar/geolocation/OpenCellIdGeolocationProvider.java @@ -27,8 +27,10 @@ public class OpenCellIdGeolocationProvider implements GeolocationProvider { private String url; public OpenCellIdGeolocationProvider(String url, String key) { - this.url = (url == null ? "http://opencellid.org/cell/get" : url) - + "?format=json&mcc=%d&mnc=%d&lac=%d&cellid=%d&key=" + key; + if (url == null) { + url = "http://opencellid.org/cell/get"; + } + this.url = url + "?format=json&mcc=%d&mnc=%d&lac=%d&cellid=%d&key=" + key; } @Override |