Skip to content

Commit

Permalink
Remove dependency on BindingContextFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
osana committed Oct 29, 2018
1 parent 118cf1d commit 0279679
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
import com.mapbox.core.utils.MapboxUtils;
import com.mapbox.core.utils.TextUtils;
import com.mapbox.geojson.Point;
import com.sun.xml.internal.ws.spi.db.BindingContextFactory;

import java.io.IOException;
import java.lang.annotation.Annotation;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.logging.Level;
import java.util.logging.Logger;

import okhttp3.ResponseBody;
import retrofit2.Call;
Expand Down Expand Up @@ -184,14 +184,14 @@ private void errorDidOccur(@Nullable Callback<DirectionsResponse> callback,
Converter<ResponseBody, DirectionsError> errorConverter =
getRetrofit().responseBodyConverter(DirectionsError.class, new Annotation[0]);
if (callback == null) {
BindingContextFactory.LOGGER.log(
Logger.getLogger(MapboxDirections.class.getName()).log(
Level.WARNING, "Failed to complete your request and callback is null");
} else {
try {
callback.onFailure(getCall(),
new Throwable(errorConverter.convert(response.errorBody()).message()));
} catch (IOException ioException) {
BindingContextFactory.LOGGER.log(
Logger.getLogger(MapboxDirections.class.getName()).log(
Level.WARNING, "Failed to complete your request. ", ioException);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
import com.mapbox.core.utils.TextUtils;
import com.mapbox.geojson.Point;

import com.sun.xml.internal.ws.spi.db.BindingContextFactory;

import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.Callback;
Expand All @@ -40,6 +38,7 @@
import java.util.List;
import java.util.Locale;
import java.util.logging.Level;
import java.util.logging.Logger;


/**
Expand Down Expand Up @@ -187,14 +186,14 @@ private void errorDidOccur(@Nullable Callback<MapMatchingResponse> callback,
Converter<ResponseBody, MapMatchingError> errorConverter =
getRetrofit().responseBodyConverter(MapMatchingError.class, new Annotation[0]);
if (callback == null) {
BindingContextFactory.LOGGER.log(
Logger.getLogger(MapboxMapMatching.class.getName()).log(
Level.WARNING, "Failed to complete your request and callback is null");
} else {
try {
callback.onFailure(getCall(),
new Throwable(errorConverter.convert(response.errorBody()).message()));
} catch (IOException ioException) {
BindingContextFactory.LOGGER.log(
Logger.getLogger(MapboxMapMatching.class.getName()).log(
Level.WARNING, "Failed to complete your request. ", ioException);
}
}
Expand Down

0 comments on commit 0279679

Please sign in to comment.