diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-11-09 12:16:46 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2019-11-09 12:16:46 -0800 |
commit | bc4a46a01e8d7c3e6238ba07f96eb67adc75c116 (patch) | |
tree | 9cca5acf154a4e0ba2dbc9f79c322405adaa553e /src/main/java/org | |
parent | 2f139fccea33ae2471969af9f0f71a8b9853e560 (diff) | |
download | traccar-server-bc4a46a01e8d7c3e6238ba07f96eb67adc75c116.tar.gz traccar-server-bc4a46a01e8d7c3e6238ba07f96eb67adc75c116.tar.bz2 traccar-server-bc4a46a01e8d7c3e6238ba07f96eb67adc75c116.zip |
Refactor constructor
Diffstat (limited to 'src/main/java/org')
-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 |