Skip to content

Commit

Permalink
Merge pull request #40 from JoshuaYin/master
Browse files Browse the repository at this point in the history
2.4.4
  • Loading branch information
joshua.yin authored May 12, 2020
2 parents fd3421c + 6de4d7a commit 0e17340
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<dependency>
<groupId>cn.ucloud.ufile</groupId>
<artifactId>ufile-client-java</artifactId>
<version>2.4.2</version>
<version>2.4.4</version>
</dependency>
```

Expand All @@ -36,7 +36,7 @@
/*
* your other dependencies
*/
implementation 'cn.ucloud.ufile:ufile-client-java:2.4.2'
implementation 'cn.ucloud.ufile:ufile-client-java:2.4.4'
}
```

Expand Down
2 changes: 1 addition & 1 deletion ufile-sample-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<dependency>
<groupId>cn.ucloud.ufile</groupId>
<artifactId>ufile-client-java</artifactId>
<version>2.4.2</version>
<version>2.4.4</version>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@
import cn.ucloud.ufile.bean.ObjectListWithDirFormatBean;
import cn.ucloud.ufile.exception.UfileClientException;
import cn.ucloud.ufile.exception.UfileServerException;
import cn.ucloud.ufile.http.HttpClient;
import cn.ucloud.ufile.http.UfileCallback;
import cn.ucloud.ufile.http.interceptor.LogInterceptor;
import cn.ucloud.ufile.sample.Constants;
import cn.ucloud.ufile.util.JLog;
import okhttp3.Request;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;

/**
* @author: joshua
Expand Down
2 changes: 1 addition & 1 deletion ufile/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>cn.ucloud.ufile</groupId>
<artifactId>ufile</artifactId>
<packaging>pom</packaging>
<version>2.4.2</version>
<version>2.4.4</version>

<modules>
<module>ufile-core</module>
Expand Down
Binary file modified ufile/ufile-client-java/apidocs.zip
Binary file not shown.
6 changes: 3 additions & 3 deletions ufile/ufile-client-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<parent>
<artifactId>ufile</artifactId>
<groupId>cn.ucloud.ufile</groupId>
<version>2.4.2</version>
<version>2.4.4</version>
</parent>

<artifactId>ufile-client-java</artifactId>
<version>2.4.2</version>
<version>2.4.4</version>

<dependencies>
<dependency>
Expand All @@ -26,7 +26,7 @@
<dependency>
<groupId>cn.ucloud.ufile</groupId>
<artifactId>ufile-core</artifactId>
<version>2.4.2</version>
<version>2.4.4</version>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,17 +196,20 @@ public ObjectListWithDirFormatBean parseHttpResponse(Response response) throws U
if (content == null || content.getJsonUserMeta() == null)
continue;

JsonObject json = content.getJsonUserMeta();
Set<String> keys = json.keySet();
if (keys != null) {
Map<String, String> metadata = new HashMap<>();
for (String name : keys) {
if (name == null || name.isEmpty())
continue;

metadata.put(name.toLowerCase(), json.get(name).getAsString());
JsonElement json = content.getJsonUserMeta();
if (json != null && json instanceof JsonObject) {
JsonObject jsonObj= (JsonObject) json;
Set<String> keys = jsonObj.keySet();
if (keys != null) {
Map<String, String> metadata = new HashMap<>();
for (String name : keys) {
if (name == null || name.isEmpty())
continue;

metadata.put(name.toLowerCase(), jsonObj.get(name).getAsString());
}
content.setUserMeta(metadata);
}
content.setUserMeta(metadata);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class MultiUploadResponse extends BaseResponseBean {
@SerializedName("Key")
private String keyName;
@SerializedName("FileSize")
private int fileSize;
private long fileSize;
@SerializedName("ETag")
protected String eTag;

Expand All @@ -41,11 +41,11 @@ public void setKeyName(String keyName) {
this.keyName = keyName;
}

public int getFileSize() {
public long getFileSize() {
return fileSize;
}

public void setFileSize(int fileSize) {
public void setFileSize(long fileSize) {
this.fileSize = fileSize;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cn.ucloud.ufile.bean;

import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.google.gson.JsonElement;
import com.google.gson.annotations.SerializedName;

import java.io.Serializable;
Expand Down Expand Up @@ -30,7 +30,7 @@ public class ObjectContentBean implements Serializable {
@SerializedName("CreateTime")
private Long createTime;
@SerializedName("UserMeta")
private JsonObject jsonUserMeta;
private JsonElement jsonUserMeta;
private transient Map<String, String> userMeta;

public String getBucketName() {
Expand Down Expand Up @@ -97,7 +97,7 @@ public void setCreateTime(long createTime) {
this.createTime = createTime;
}

public JsonObject getJsonUserMeta() {
public JsonElement getJsonUserMeta() {
return jsonUserMeta;
}

Expand Down
Binary file modified ufile/ufile-core/apidocs.zip
Binary file not shown.
6 changes: 3 additions & 3 deletions ufile/ufile-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>ufile</artifactId>
<groupId>cn.ucloud.ufile</groupId>
<version>2.4.2</version>
<artifactId>ufile</artifactId>
<version>2.4.4</version>
</parent>

<artifactId>ufile-core</artifactId>
<version>2.4.2</version>
<version>2.4.4</version>

<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @date: 2018/11/22 15:00
*/
public class UfileConstants {
public static final String SDK_VERSION = "2.4.2";
public static final String SDK_VERSION = "2.4.4";
/**
* 默认分片大小(4MB)
*/
Expand Down

0 comments on commit 0e17340

Please sign in to comment.