Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ public void setEnableDebug(boolean enableDebug) {
* @since 2.0.0
*/
public okhttp3.Call.Factory getCallFactory() {
if (callFactory == null) {
return getOkHttpClient();
}

return callFactory;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,17 @@ private DirectionsService getService() {
}

// Retrofit instance
Retrofit retrofit = new Retrofit.Builder()
.client(getOkHttpClient())
Retrofit.Builder retrofitBuilder = new Retrofit.Builder()
.baseUrl(builder.getBaseUrl())
.addConverterFactory(GsonConverterFactory.create())
.callFactory(getCallFactory())
.build();
.addConverterFactory(GsonConverterFactory.create());
if (getCallFactory() != null) {
retrofitBuilder.callFactory(getCallFactory());
} else {
retrofitBuilder.client(getOkHttpClient());
}

// Directions service
service = retrofit.create(DirectionsService.class);
service = retrofitBuilder.build().create(DirectionsService.class);
return service;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ public class DirectionsResponse {
private List<DirectionsRoute> routes;
private List<DirectionsWaypoint> waypoints;

public DirectionsResponse() {
}

public DirectionsResponse(List<DirectionsRoute> routes, List<DirectionsWaypoint> waypoints) {
this.routes = routes;
this.waypoints = waypoints;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ public class DirectionsRoute {
private String geometry;
private List<RouteLeg> legs;

public DirectionsRoute() {
}

/**
* The distance traveled from origin to destination.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ public class DirectionsWaypoint {
private String name;
private double[] location;

public DirectionsWaypoint() {
}

/**
* @return String with the name of the way the coordinate snapped to.
* @since 1.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ public class IntersectionLanes {
private boolean valid;
private String[] indications;

public IntersectionLanes() {
}

/**
* @return Boolean value for whether this lane can be taken to complete the maneuver. For
* instance, if the lane array has four objects and the first two are marked as valid, then the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ public class LegStep {
private StepManeuver maneuver;
private List<StepIntersection> intersections;

public LegStep() {
}

/**
* The distance traveled from the maneuver to the next {@link LegStep}.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ public class RouteLeg {
private String summary;
private List<LegStep> steps;

public RouteLeg() {
}

/**
* The distance traveled from one waypoint to another.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ public class StepIntersection {
private int out;
private IntersectionLanes[] lanes;

public StepIntersection() {
}

/**
* @return A [longitude, latitude] pair describing the location of the turn.
* @since 1.3.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ public class StepManeuver {
private String instruction;
private Integer exit;

public StepManeuver() {
}

/**
* @return double array of [longitude, latitude] for the snapped coordinate.
* @since 1.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,17 @@ private DistanceService getService() {
}

// Retrofit instance
Retrofit retrofit = new Retrofit.Builder()
.client(getOkHttpClient())
Retrofit.Builder retrofitBuilder = new Retrofit.Builder()
.baseUrl(builder.getBaseUrl())
.addConverterFactory(GsonConverterFactory.create(getGson()))
.callFactory(getCallFactory())
.build();
.addConverterFactory(GsonConverterFactory.create(getGson()));
if (getCallFactory() != null) {
retrofitBuilder.callFactory(getCallFactory());
} else {
retrofitBuilder.client(getOkHttpClient());
}

// Distance service
service = retrofit.create(DistanceService.class);
service = retrofitBuilder.build().create(DistanceService.class);
return service;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,16 @@ public GeocodingService getService() {
return service;
}

Retrofit retrofit = new Retrofit.Builder()
.client(getOkHttpClient())
Retrofit.Builder retrofitBuilder = new Retrofit.Builder()
.baseUrl(builder.getBaseUrl())
.addConverterFactory(GsonConverterFactory.create(getGson()))
.callFactory(getCallFactory())
.build();
.addConverterFactory(GsonConverterFactory.create(getGson()));
if (getCallFactory() != null) {
retrofitBuilder.callFactory(getCallFactory());
} else {
retrofitBuilder.client(getOkHttpClient());
}

service = retrofit.create(GeocodingService.class);
service = retrofitBuilder.build().create(GeocodingService.class);
return service;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ public class CarmenContext {
private String category;
private String maki;

public CarmenContext() {
}

/**
* ID of the feature of the form {index}.{id} where index is the id/handle of the datasource
* that contributed the result.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ public class CarmenFeatureCollection extends BaseFeatureCollection {

private List<String> query;
private String attribution;
private final List<CarmenFeature> features;
private List<CarmenFeature> features;

public CarmenFeatureCollection() {
}

/**
* Protected constructor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,17 @@ private MapMatchingService getService() {
}

// Retrofit instance
Retrofit retrofit = new Retrofit.Builder()
.client(getOkHttpClient())
Retrofit.Builder retrofitBuilder = new Retrofit.Builder()
.baseUrl(builder.getBaseUrl())
.addConverterFactory(GsonConverterFactory.create())
.callFactory(getCallFactory())
.build();
.addConverterFactory(GsonConverterFactory.create());
if (getCallFactory() != null) {
retrofitBuilder.callFactory(getCallFactory());
} else {
retrofitBuilder.client(getOkHttpClient());
}

// MapMatching service
service = retrofit.create(MapMatchingService.class);
service = retrofitBuilder.build().create(MapMatchingService.class);
return service;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ public class MapMatchingMatching extends DirectionsRoute {

private double confidence;

public MapMatchingMatching() {
}

/**
* A number between 0 (low) and 1 (high) indicating level of confidence in the returned match
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ public class MapMatchingResponse {
private List<MapMatchingMatching> matchings;
private List<MapMatchingTracepoint> tracepoints;

public MapMatchingResponse() {
}

/**
* A string depicting the state of the response.
* <ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ public class MapMatchingTracepoint extends DirectionsWaypoint {
@SerializedName("waypoint_index")
private int waypointIndex;

public MapMatchingTracepoint() {
}

/**
* Index to the match object in matchings the sub-trace was matched to.
*
Expand Down