File tree Expand file tree Collapse file tree 12 files changed +30
-30
lines changed
src/main/java/cn/ucloud/ufile/sample/object
src/main/java/cn/ucloud/ufile
src/main/java/cn/ucloud/ufile Expand file tree Collapse file tree 12 files changed +30
-30
lines changed Original file line number Diff line number Diff line change 25
25
<dependency >
26
26
<groupId >cn.ucloud.ufile</groupId >
27
27
<artifactId >ufile-client-java</artifactId >
28
- <version >2.4.2 </version >
28
+ <version >2.4.4 </version >
29
29
</dependency >
30
30
```
31
31
36
36
/*
37
37
* your other dependencies
38
38
*/
39
- implementation 'cn.ucloud.ufile:ufile-client-java:2.4.2 '
39
+ implementation 'cn.ucloud.ufile:ufile-client-java:2.4.4 '
40
40
}
41
41
```
42
42
Original file line number Diff line number Diff line change 26
26
<dependency >
27
27
<groupId >cn.ucloud.ufile</groupId >
28
28
<artifactId >ufile-client-java</artifactId >
29
- <version >2.4.2 </version >
29
+ <version >2.4.4 </version >
30
30
</dependency >
31
31
</dependencies >
32
32
Original file line number Diff line number Diff line change 7
7
import cn .ucloud .ufile .bean .ObjectListWithDirFormatBean ;
8
8
import cn .ucloud .ufile .exception .UfileClientException ;
9
9
import cn .ucloud .ufile .exception .UfileServerException ;
10
- import cn .ucloud .ufile .http .HttpClient ;
11
10
import cn .ucloud .ufile .http .UfileCallback ;
12
- import cn .ucloud .ufile .http .interceptor .LogInterceptor ;
13
11
import cn .ucloud .ufile .sample .Constants ;
14
12
import cn .ucloud .ufile .util .JLog ;
15
13
import okhttp3 .Request ;
16
14
17
15
import java .util .ArrayList ;
18
16
import java .util .List ;
19
- import java .util .concurrent .TimeUnit ;
20
17
21
18
/**
22
19
* @author: joshua
Original file line number Diff line number Diff line change 7
7
<groupId >cn.ucloud.ufile</groupId >
8
8
<artifactId >ufile</artifactId >
9
9
<packaging >pom</packaging >
10
- <version >2.4.2 </version >
10
+ <version >2.4.4 </version >
11
11
12
12
<modules >
13
13
<module >ufile-core</module >
Original file line number Diff line number Diff line change 6
6
<parent >
7
7
<artifactId >ufile</artifactId >
8
8
<groupId >cn.ucloud.ufile</groupId >
9
- <version >2.4.2 </version >
9
+ <version >2.4.4 </version >
10
10
</parent >
11
11
12
12
<artifactId >ufile-client-java</artifactId >
13
- <version >2.4.2 </version >
13
+ <version >2.4.4 </version >
14
14
15
15
<dependencies >
16
16
<dependency >
26
26
<dependency >
27
27
<groupId >cn.ucloud.ufile</groupId >
28
28
<artifactId >ufile-core</artifactId >
29
- <version >2.4.2 </version >
29
+ <version >2.4.4 </version >
30
30
</dependency >
31
31
</dependencies >
32
32
Original file line number Diff line number Diff line change @@ -196,17 +196,20 @@ public ObjectListWithDirFormatBean parseHttpResponse(Response response) throws U
196
196
if (content == null || content .getJsonUserMeta () == null )
197
197
continue ;
198
198
199
- JsonObject json = content .getJsonUserMeta ();
200
- Set <String > keys = json .keySet ();
201
- if (keys != null ) {
202
- Map <String , String > metadata = new HashMap <>();
203
- for (String name : keys ) {
204
- if (name == null || name .isEmpty ())
205
- continue ;
206
-
207
- metadata .put (name .toLowerCase (), json .get (name ).getAsString ());
199
+ JsonElement json = content .getJsonUserMeta ();
200
+ if (json != null && json instanceof JsonObject ) {
201
+ JsonObject jsonObj = (JsonObject ) json ;
202
+ Set <String > keys = jsonObj .keySet ();
203
+ if (keys != null ) {
204
+ Map <String , String > metadata = new HashMap <>();
205
+ for (String name : keys ) {
206
+ if (name == null || name .isEmpty ())
207
+ continue ;
208
+
209
+ metadata .put (name .toLowerCase (), jsonObj .get (name ).getAsString ());
210
+ }
211
+ content .setUserMeta (metadata );
208
212
}
209
- content .setUserMeta (metadata );
210
213
}
211
214
}
212
215
}
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ public class MultiUploadResponse extends BaseResponseBean {
15
15
@ SerializedName ("Key" )
16
16
private String keyName ;
17
17
@ SerializedName ("FileSize" )
18
- private int fileSize ;
18
+ private long fileSize ;
19
19
@ SerializedName ("ETag" )
20
20
protected String eTag ;
21
21
@@ -41,11 +41,11 @@ public void setKeyName(String keyName) {
41
41
this .keyName = keyName ;
42
42
}
43
43
44
- public int getFileSize () {
44
+ public long getFileSize () {
45
45
return fileSize ;
46
46
}
47
47
48
- public void setFileSize (int fileSize ) {
48
+ public void setFileSize (long fileSize ) {
49
49
this .fileSize = fileSize ;
50
50
}
51
51
Original file line number Diff line number Diff line change 1
1
package cn .ucloud .ufile .bean ;
2
2
3
3
import com .google .gson .Gson ;
4
- import com .google .gson .JsonObject ;
4
+ import com .google .gson .JsonElement ;
5
5
import com .google .gson .annotations .SerializedName ;
6
6
7
7
import java .io .Serializable ;
@@ -30,7 +30,7 @@ public class ObjectContentBean implements Serializable {
30
30
@ SerializedName ("CreateTime" )
31
31
private Long createTime ;
32
32
@ SerializedName ("UserMeta" )
33
- private JsonObject jsonUserMeta ;
33
+ private JsonElement jsonUserMeta ;
34
34
private transient Map <String , String > userMeta ;
35
35
36
36
public String getBucketName () {
@@ -97,7 +97,7 @@ public void setCreateTime(long createTime) {
97
97
this .createTime = createTime ;
98
98
}
99
99
100
- public JsonObject getJsonUserMeta () {
100
+ public JsonElement getJsonUserMeta () {
101
101
return jsonUserMeta ;
102
102
}
103
103
Original file line number Diff line number Diff line change 4
4
xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
5
5
<modelVersion >4.0.0</modelVersion >
6
6
<parent >
7
- <artifactId >ufile</artifactId >
8
7
<groupId >cn.ucloud.ufile</groupId >
9
- <version >2.4.2</version >
8
+ <artifactId >ufile</artifactId >
9
+ <version >2.4.4</version >
10
10
</parent >
11
11
12
12
<artifactId >ufile-core</artifactId >
13
- <version >2.4.2 </version >
13
+ <version >2.4.4 </version >
14
14
15
15
<dependencies >
16
16
<dependency >
Original file line number Diff line number Diff line change 6
6
* @date: 2018/11/22 15:00
7
7
*/
8
8
public class UfileConstants {
9
- public static final String SDK_VERSION = "2.4.2 " ;
9
+ public static final String SDK_VERSION = "2.4.4 " ;
10
10
/**
11
11
* 默认分片大小(4MB)
12
12
*/
You can’t perform that action at this time.
0 commit comments