Skip to content

Commit

Permalink
Merge pull request square#1031 from square/jw/okhttp-two-five-final
Browse files Browse the repository at this point in the history
OKHttp 2.5.0 release version.
  • Loading branch information
swankjesse committed Aug 26, 2015
2 parents 4a4fbdf + eac69ff commit 93bd511
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<!-- Dependencies -->
<android.version>4.1.1.4</android.version>
<android.platform>16</android.platform>
<okhttp.version>2.5.0-SNAPSHOT</okhttp.version>
<okhttp.version>2.5.0</okhttp.version>
<animal.sniffer.version>1.14</animal.sniffer.version>

<!-- Adapter Dependencies -->
Expand Down
10 changes: 0 additions & 10 deletions retrofit/src/main/java/retrofit/Platform.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import com.squareup.okhttp.OkHttpClient;
import java.lang.invoke.MethodHandles;
import java.lang.reflect.Method;
import java.util.concurrent.Executor;
import java.util.concurrent.TimeUnit;
import org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement;

class Platform {
Expand Down Expand Up @@ -55,14 +53,6 @@ CallAdapter.Factory defaultCallAdapterFactory(Executor callbackExecutor) {
return DefaultCallAdapter.FACTORY;
}

OkHttpClient defaultClient() {
OkHttpClient client = new OkHttpClient();
client.setConnectTimeout(15, TimeUnit.SECONDS);
client.setReadTimeout(15, TimeUnit.SECONDS);
client.setWriteTimeout(15, TimeUnit.SECONDS);
return client;
}

boolean isDefaultMethod(Method method) {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion retrofit/src/main/java/retrofit/Retrofit.java
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public Retrofit build() {

OkHttpClient client = this.client;
if (client == null) {
client = Platform.get().defaultClient();
client = new OkHttpClient();
}

// Make a defensive copy of the adapters and add the default Call adapter.
Expand Down

0 comments on commit 93bd511

Please sign in to comment.