diff --git a/ext/client-core-android/src/main/java/org/apache/olingo/client/core/android/http/AndroidHttpClientFactory.java b/ext/client-core-android/src/main/java/org/apache/olingo/client/core/android/http/AndroidHttpClientFactory.java index 4baa0c233..b6605e702 100644 --- a/ext/client-core-android/src/main/java/org/apache/olingo/client/core/android/http/AndroidHttpClientFactory.java +++ b/ext/client-core-android/src/main/java/org/apache/olingo/client/core/android/http/AndroidHttpClientFactory.java @@ -29,7 +29,7 @@ public class AndroidHttpClientFactory extends AbstractHttpClientFactory { private static final long serialVersionUID = -5224104561624556177L; @Override - public HttpClient create(final HttpMethod method, final URI uri) { + public AndroidHttpClient create(final HttpMethod method, final URI uri) { return AndroidHttpClient.newInstance(USER_AGENT); } diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/http/ProxyWrapperHttpClientFactory.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/http/ProxyWrapperHttpClientFactory.java index 2ce0b3d82..5926e30c0 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/http/ProxyWrapperHttpClientFactory.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/http/ProxyWrapperHttpClientFactory.java @@ -70,7 +70,7 @@ public class ProxyWrapperHttpClientFactory implements HttpClientFactory { @Override public HttpClient create(final HttpMethod method, final URI uri) { // Use wrapped factory to obtain an httpclient instance for given method and uri - final DefaultHttpClient httpclient = (DefaultHttpClient) wrapped.create(method, uri); + final DefaultHttpClient httpclient = wrapped.create(method, uri); final HttpHost proxyHost = new HttpHost(proxy.getHost(), proxy.getPort());