Skip to content

Commit ceec021

Browse files
author
Kannan Goundan
committed
OkHttpRequestor: Deprecate getClient().
It seems like an unnecessary API. If you want access to that client, just keep it around instead of keeping around the HttpRequestor wrapper.
1 parent 1221271 commit ceec021

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

src/main/java/com/dropbox/core/http/OkHttp3Requestor.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,10 @@ public OkHttp3Requestor(OkHttpClient client) {
8282
}
8383

8484
/**
85-
* Returns the underlying {@code OkHttpClient} used to make requests.
86-
*
87-
* If you want to modify the client for a particular request, create a new instance of this
88-
* requestor with the modified client.
89-
*
90-
* @return underlying {@code OkHttpClient} used by this requestor.
85+
* @deprecated If you need access to the {@link OkHttpClient} instance you passed
86+
* into the constructor, keep track of it yourself.
9187
*/
88+
@Deprecated
9289
public OkHttpClient getClient() {
9390
return client;
9491
}

src/main/java/com/dropbox/core/http/OkHttpRequestor.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,10 @@ public OkHttpRequestor(OkHttpClient client) {
8585
}
8686

8787
/**
88-
* Returns a clone of the underlying {@code OkHttpClient} used to make requests.
89-
*
90-
* If you want to modify the client for a particular request, create a new instance of this
91-
* requestor with the modified client.
92-
*
93-
* @return clone of the underlying {@code OkHttpClient} used by this requestor.
88+
* @deprecated If you need access to the {@link OkHttpClient} instance you passed
89+
* into the constructor, keep track of it yourself.
9490
*/
91+
@Deprecated
9592
public OkHttpClient getClient() {
9693
return client;
9794
}

0 commit comments

Comments
 (0)