Skip to content

Commit 73fd5ca

Browse files
authored
Remove dependency on BindingContextFactory (#909)
1 parent 118cf1d commit 73fd5ca

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

services-directions/src/main/java/com/mapbox/api/directions/v5/MapboxDirections.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
import com.mapbox.core.utils.MapboxUtils;
2525
import com.mapbox.core.utils.TextUtils;
2626
import com.mapbox.geojson.Point;
27-
import com.sun.xml.internal.ws.spi.db.BindingContextFactory;
2827

2928
import java.io.IOException;
3029
import java.lang.annotation.Annotation;
3130
import java.util.ArrayList;
3231
import java.util.List;
3332
import java.util.Locale;
3433
import java.util.logging.Level;
34+
import java.util.logging.Logger;
3535

3636
import okhttp3.ResponseBody;
3737
import retrofit2.Call;
@@ -184,14 +184,14 @@ private void errorDidOccur(@Nullable Callback<DirectionsResponse> callback,
184184
Converter<ResponseBody, DirectionsError> errorConverter =
185185
getRetrofit().responseBodyConverter(DirectionsError.class, new Annotation[0]);
186186
if (callback == null) {
187-
BindingContextFactory.LOGGER.log(
187+
Logger.getLogger(MapboxDirections.class.getName()).log(
188188
Level.WARNING, "Failed to complete your request and callback is null");
189189
} else {
190190
try {
191191
callback.onFailure(getCall(),
192192
new Throwable(errorConverter.convert(response.errorBody()).message()));
193193
} catch (IOException ioException) {
194-
BindingContextFactory.LOGGER.log(
194+
Logger.getLogger(MapboxDirections.class.getName()).log(
195195
Level.WARNING, "Failed to complete your request. ", ioException);
196196
}
197197
}

services-matching/src/main/java/com/mapbox/api/matching/v5/MapboxMapMatching.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
import com.mapbox.core.utils.TextUtils;
2727
import com.mapbox.geojson.Point;
2828

29-
import com.sun.xml.internal.ws.spi.db.BindingContextFactory;
30-
3129
import okhttp3.ResponseBody;
3230
import retrofit2.Call;
3331
import retrofit2.Callback;
@@ -40,6 +38,7 @@
4038
import java.util.List;
4139
import java.util.Locale;
4240
import java.util.logging.Level;
41+
import java.util.logging.Logger;
4342

4443

4544
/**
@@ -187,14 +186,14 @@ private void errorDidOccur(@Nullable Callback<MapMatchingResponse> callback,
187186
Converter<ResponseBody, MapMatchingError> errorConverter =
188187
getRetrofit().responseBodyConverter(MapMatchingError.class, new Annotation[0]);
189188
if (callback == null) {
190-
BindingContextFactory.LOGGER.log(
189+
Logger.getLogger(MapboxMapMatching.class.getName()).log(
191190
Level.WARNING, "Failed to complete your request and callback is null");
192191
} else {
193192
try {
194193
callback.onFailure(getCall(),
195194
new Throwable(errorConverter.convert(response.errorBody()).message()));
196195
} catch (IOException ioException) {
197-
BindingContextFactory.LOGGER.log(
196+
Logger.getLogger(MapboxMapMatching.class.getName()).log(
198197
Level.WARNING, "Failed to complete your request. ", ioException);
199198
}
200199
}

0 commit comments

Comments
 (0)