Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Up v2 #472

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion src/main/java/com/qiniu/http/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ public void accept(String key, Object value) {
IpTag tag = new IpTag();
try {
res = httpClient.newCall(requestBuilder.tag(tag).build()).execute();
} catch (IOException e) {
} catch (Exception e) {
throw new QiniuException(e);
}

Expand Down
17 changes: 15 additions & 2 deletions src/main/java/com/qiniu/storage/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ public final class Configuration implements Cloneable {
public static String defaultRsHost = "rs.qiniu.com";
public static String defaultApiHost = "api.qiniu.com";
public static String defaultUcHost = "uc.qbox.me";

/**
* 使用的Region
* 使用的 Region 设置 region 请调用 setRegion
*/
public Region region;
/**
* 使用的Zone
* 使用的 Zone 。推荐使用 Region ,设置 region 请调用 setRegion
*/
@Deprecated
public Zone zone;
Expand Down Expand Up @@ -107,6 +108,18 @@ public Configuration(Zone zone) {
configHelper = new ConfigHelper(this);
}

public void setRegion(Region region) {
this.region = region;
configHelper = new ConfigHelper(this);
}

@Deprecated
public void setZone(Zone zone) {
this.region = null;
this.zone = zone;
configHelper = new ConfigHelper(this);
}

public Configuration clone() {
try {
return (Configuration) super.clone();
Expand Down
559 changes: 228 additions & 331 deletions src/main/java/com/qiniu/storage/FixBlockUploader.java

Large diffs are not rendered by default.

Loading