Skip to content

Commit

Permalink
Update dependencies to official releases
Browse files Browse the repository at this point in the history
  • Loading branch information
jianghaolu committed Jun 7, 2016
1 parent 9c4442d commit 7ad2207
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 92 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public <T> ServiceResponse<T> getPutOrPatchResult(Response<ResponseBody> respons

int statusCode = response.code();
ResponseBody responseBody;
if (response.isSuccess()) {
if (response.isSuccessful()) {
responseBody = response.body();
} else {
responseBody = response.errorBody();
Expand Down Expand Up @@ -164,7 +164,7 @@ public <T> AsyncPollingTask<T> getPutOrPatchResultAsync(Response<ResponseBody> r

int statusCode = response.code();
ResponseBody responseBody;
if (response.isSuccess()) {
if (response.isSuccessful()) {
responseBody = response.body();
} else {
responseBody = response.errorBody();
Expand Down Expand Up @@ -252,7 +252,7 @@ public <T> ServiceResponse<T> getPostOrDeleteResult(Response<ResponseBody> respo

int statusCode = response.code();
ResponseBody responseBody;
if (response.isSuccess()) {
if (response.isSuccessful()) {
responseBody = response.body();
} else {
responseBody = response.errorBody();
Expand Down Expand Up @@ -337,7 +337,7 @@ public <T> AsyncPollingTask<T> getPostOrDeleteResultAsync(Response<ResponseBody>

int statusCode = response.code();
ResponseBody responseBody;
if (response.isSuccess()) {
if (response.isSuccessful()) {
responseBody = response.body();
} else {
responseBody = response.errorBody();
Expand Down
14 changes: 6 additions & 8 deletions client-runtime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,12 @@ checkstyle {

dependencies {
compile 'com.google.guava:guava:18.0'
compile 'com.squareup.retrofit2:retrofit:2.0.0-beta4'
compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'com.squareup.okio:okio:1.7.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.1.1'
compile 'com.squareup.okhttp3:okhttp-urlconnection:3.1.1'
compile 'com.squareup.retrofit2:converter-jackson:2.0.0-beta4'
compile 'com.fasterxml.jackson.core:jackson-databind:2.7.1'
compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.7.1'
compile 'com.squareup.retrofit2:retrofit:2.0.2'
compile 'com.squareup.okhttp3:okhttp:3.3.1'
compile 'com.squareup.okhttp3:logging-interceptor:3.3.1'
compile 'com.squareup.okhttp3:okhttp-urlconnection:3.3.1'
compile 'com.squareup.retrofit2:converter-jackson:2.0.2'
compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.7.2'
compile 'org.apache.commons:commons-lang3:3.4'
testCompile 'junit:junit:4.12'
testCompile 'junit:junit-dep:4.11'
Expand Down
8 changes: 0 additions & 8 deletions client-runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio</artifactId>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>logging-interceptor</artifactId>
Expand All @@ -75,10 +71,6 @@
<groupId>com.squareup.retrofit2</groupId>
<artifactId>converter-jackson</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,15 @@ public ServiceResponse<T> build(Response<ResponseBody> response) throws E, IOExc

int statusCode = response.code();
ResponseBody responseBody;
if (response.isSuccess()) {
if (response.isSuccessful()) {
responseBody = response.body();
} else {
responseBody = response.errorBody();
}

if (responseTypes.containsKey(statusCode)) {
return new ServiceResponse<>((T) buildBody(statusCode, responseBody), response);
} else if (response.isSuccess() && responseTypes.size() == 1) {
} else if (response.isSuccessful() && responseTypes.size() == 1) {
return new ServiceResponse<>((T) buildBody(statusCode, responseBody), response);
} else {
try {
Expand Down Expand Up @@ -175,7 +175,7 @@ public ServiceResponse<T> buildEmpty(Response<Void> response) throws E, IOExcept
int statusCode = response.code();
if (responseTypes.containsKey(statusCode)) {
return new ServiceResponse<>(response);
} else if (response.isSuccess() && responseTypes.size() == 1) {
} else if (response.isSuccessful() && responseTypes.size() == 1) {
return new ServiceResponse<>(response);
} else {
try {
Expand Down
22 changes: 6 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,42 +79,32 @@
<dependency>
<groupId>com.squareup.retrofit2</groupId>
<artifactId>retrofit</artifactId>
<version>2.0.0-beta4</version>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio</artifactId>
<version>1.7.0</version>
<version>3.3.1</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>logging-interceptor</artifactId>
<version>3.1.1</version>
<version>3.3.1</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp-urlconnection</artifactId>
<version>3.1.1</version>
<version>3.3.1</version>
</dependency>
<dependency>
<groupId>com.squareup.retrofit2</groupId>
<artifactId>converter-jackson</artifactId>
<version>2.0.0-beta4</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.7.1</version>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
<version>2.7.1</version>
<version>2.7.2</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
Expand Down

0 comments on commit 7ad2207

Please sign in to comment.