aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-11-09 12:16:46 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2019-11-09 12:16:46 -0800
commitbc4a46a01e8d7c3e6238ba07f96eb67adc75c116 (patch)
tree9cca5acf154a4e0ba2dbc9f79c322405adaa553e /src/main/java
parent2f139fccea33ae2471969af9f0f71a8b9853e560 (diff)
downloadtraccar-server-bc4a46a01e8d7c3e6238ba07f96eb67adc75c116.tar.gz
traccar-server-bc4a46a01e8d7c3e6238ba07f96eb67adc75c116.tar.bz2
traccar-server-bc4a46a01e8d7c3e6238ba07f96eb67adc75c116.zip
Refactor constructor
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/traccar/geolocation/OpenCellIdGeolocationProvider.java6
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