Skip to content

Commit 5b08fc5

Browse files
author
joshua.yin
authored
Merge pull request #48 from JoshuaYin/master
修复错误返回若不是json格式时的崩溃 bug
2 parents 3874d9d + cfa171b commit 5b08fc5

12 files changed

Lines changed: 32 additions & 20 deletions

File tree

ufile-sample-java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<dependency>
5656
<groupId>cn.ucloud.ufile</groupId>
5757
<artifactId>ufile-client-java</artifactId>
58-
<version>2.6.2</version>
58+
<version>2.6.4</version>
5959
</dependency>
6060
</dependencies>
6161

ufile/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<groupId>cn.ucloud.ufile</groupId>
88
<artifactId>ufile</artifactId>
99
<packaging>pom</packaging>
10-
<version>2.6.3</version>
10+
<version>2.6.4</version>
1111

1212
<modules>
1313
<module>ufile-core</module>
-565 Bytes
Binary file not shown.

ufile/ufile-client-java/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
<parent>
77
<artifactId>ufile</artifactId>
88
<groupId>cn.ucloud.ufile</groupId>
9-
<version>2.6.3</version>
9+
<version>2.6.4</version>
1010
</parent>
1111

1212
<artifactId>ufile-client-java</artifactId>
13-
<version>2.6.3</version>
13+
<version>2.6.4</version>
1414

1515
<dependencies>
1616
<dependency>
@@ -26,7 +26,7 @@
2626
<dependency>
2727
<groupId>cn.ucloud.ufile</groupId>
2828
<artifactId>ufile-core</artifactId>
29-
<version>2.6.3</version>
29+
<version>2.6.4</version>
3030
</dependency>
3131
</dependencies>
3232

ufile/ufile-client-java/src/main/java/cn/ucloud/ufile/api/object/PutFileApi.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@ public UfileErrorBean parseErrorResponse(Response response) throws UfileClientEx
398398
errorBean = new Gson().fromJson((content == null || content.length() == 0) ? "{}" : content, UfileErrorBean.class);
399399
} catch (Exception e) {
400400
errorBean = new UfileErrorBean();
401+
errorBean.setErrMsg(content);
401402
}
402403
errorBean.setResponseCode(response.code());
403404
errorBean.setxSessionId(response.header("X-SessionId"));

ufile/ufile-client-java/src/main/java/cn/ucloud/ufile/api/object/PutStreamApi.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,7 @@ public UfileErrorBean parseErrorResponse(Response response) throws UfileClientEx
404404
errorBean = new Gson().fromJson((content == null || content.length() == 0) ? "{}" : content, UfileErrorBean.class);
405405
} catch (Exception e) {
406406
errorBean = new UfileErrorBean();
407+
errorBean.setErrMsg(content);
407408
}
408409
errorBean.setResponseCode(response.code());
409410
errorBean.setxSessionId(response.header("X-SessionId"));

ufile/ufile-client-java/src/main/java/cn/ucloud/ufile/api/object/multi/FinishMultiUploadApi.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ public UfileErrorBean parseErrorResponse(Response response) throws UfileClientEx
269269
errorBean = new Gson().fromJson((content == null || content.length() == 0) ? "{}" : content, UfileErrorBean.class);
270270
} catch (Exception e) {
271271
errorBean = new UfileErrorBean();
272+
errorBean.setErrMsg(content);
272273
}
273274
errorBean.setResponseCode(response.code());
274275
errorBean.setxSessionId(response.header("X-SessionId"));

ufile/ufile-core/apidocs.zip

-404 Bytes
Binary file not shown.

ufile/ufile-core/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
<parent>
77
<groupId>cn.ucloud.ufile</groupId>
88
<artifactId>ufile</artifactId>
9-
<version>2.6.3</version>
9+
<version>2.6.4</version>
1010
</parent>
1111

1212
<artifactId>ufile-core</artifactId>
13-
<version>2.6.3</version>
13+
<version>2.6.4</version>
1414

1515
<dependencies>
1616
<dependency>

ufile/ufile-core/src/main/java/cn/ucloud/ufile/UfileConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @date: 2018/11/22 15:00
77
*/
88
public class UfileConstants {
9-
public static final String SDK_VERSION = "2.6.3";
9+
public static final String SDK_VERSION = "2.6.4";
1010
/**
1111
* 默认分片大小(4MB)
1212
*/

0 commit comments

Comments
 (0)