Skip to content

Commit b880b6f

Browse files
authored
Merge pull request #61 from aliyun/fix_gen_url
fix gen url
2 parents d250f10 + 7136f18 commit b880b6f

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

src/main/java/com/aliyun/oss/common/parser/RequestMarshallers.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ public FixedLengthInputStream marshall(ImageProcess imageProcessConf) {
141141
xmlBody.append("<SourceFileProtectSuffix>" + imageProcessConf.getSourceFileProtectSuffix()
142142
+ "</SourceFileProtectSuffix>");
143143
xmlBody.append("<StyleDelimiters>" + imageProcessConf.getStyleDelimiters() + "</StyleDelimiters>");
144-
if (imageProcessConf.isDomainSupportAt() != null &&
145-
imageProcessConf.isDomainSupportAt().booleanValue()) {
144+
if (imageProcessConf.isSupportAtStyle() != null &&
145+
imageProcessConf.isSupportAtStyle().booleanValue()) {
146146
xmlBody.append("<OssDomainSupportAtProcess>Enabled</OssDomainSupportAtProcess>");
147147
} else {
148148
xmlBody.append("<OssDomainSupportAtProcess>Disabled</OssDomainSupportAtProcess>");

src/main/java/com/aliyun/oss/model/ImageProcess.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ public ImageProcess(String compliedHost, Boolean sourceFileProtect,
2727
this.sourceFileProtect = sourceFileProtect;
2828
this.sourceFileProtectSuffix = sourceFileProtectSuffix;
2929
this.styleDelimiters = styleDelimiters;
30-
this.domainSupportAt = null;
30+
this.supportAtStyle = null;
3131
}
3232

3333
public ImageProcess(String compliedHost, Boolean sourceFileProtect,
3434
String sourceFileProtectSuffix, String styleDelimiters,
35-
Boolean domainSupportAt) {
35+
Boolean supportAtStyle) {
3636
this.compliedHost = compliedHost;
3737
this.sourceFileProtect = sourceFileProtect;
3838
this.sourceFileProtectSuffix = sourceFileProtectSuffix;
3939
this.styleDelimiters = styleDelimiters;
40-
this.domainSupportAt = domainSupportAt;
40+
this.supportAtStyle = supportAtStyle;
4141
}
4242

4343
public String getCompliedHost() {
@@ -80,12 +80,12 @@ public void setVersion(Integer version) {
8080
this.version = version;
8181
}
8282

83-
public Boolean isDomainSupportAt() {
84-
return domainSupportAt;
83+
public Boolean isSupportAtStyle() {
84+
return supportAtStyle;
8585
}
8686

87-
public void setDomainSupportAt(Boolean domainSupportAt) {
88-
this.domainSupportAt = domainSupportAt;
87+
public void setSupportAtStyle(Boolean supportAtStyle) {
88+
this.supportAtStyle = supportAtStyle;
8989
}
9090

9191
// Img表示设置的样式分隔符,只有Img能用;Both表示oss也能用Img的样式分隔符
@@ -99,6 +99,6 @@ public void setDomainSupportAt(Boolean domainSupportAt) {
9999
// 图片服务的版本目前是2,只能读取不能设置
100100
private Integer version;
101101
// 用户是否能够通过OSS域名使用老版图片处理接口,@格式。默认Disabled
102-
private Boolean domainSupportAt;
102+
private Boolean supportAtStyle;
103103

104104
}

src/test/java/com/aliyun/oss/integrationtests/BucketProcesTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public void testBucketImageProcessConf() {
4242
Assert.assertEquals(bucketProcess.getImageProcess().getSourceFileProtectSuffix(), "");
4343
Assert.assertEquals(bucketProcess.getImageProcess().getStyleDelimiters(), "");
4444
Assert.assertEquals(bucketProcess.getImageProcess().getVersion().intValue(), 2);
45-
Assert.assertEquals(bucketProcess.getImageProcess().isDomainSupportAt(), null);
45+
Assert.assertEquals(bucketProcess.getImageProcess().isSupportAtStyle(), null);
4646

4747
// put 1
4848
ImageProcess imageProcess = new ImageProcess("Img", true, "jpg,png", "/,-");
@@ -56,7 +56,7 @@ public void testBucketImageProcessConf() {
5656
Assert.assertEquals(bucketProcess.getImageProcess().getSourceFileProtectSuffix(), "jpg,png");
5757
Assert.assertEquals(bucketProcess.getImageProcess().getStyleDelimiters(), "-,/");
5858
Assert.assertEquals(bucketProcess.getImageProcess().getVersion().intValue(), 2);
59-
Assert.assertEquals(bucketProcess.getImageProcess().isDomainSupportAt(), null);
59+
Assert.assertEquals(bucketProcess.getImageProcess().isSupportAtStyle(), null);
6060

6161
// put 2
6262
imageProcess = new ImageProcess("Both", false, "gif", "-");
@@ -70,7 +70,7 @@ public void testBucketImageProcessConf() {
7070
Assert.assertEquals(bucketProcess.getImageProcess().getSourceFileProtectSuffix(), "");
7171
Assert.assertEquals(bucketProcess.getImageProcess().getStyleDelimiters(), "-");
7272
Assert.assertEquals(bucketProcess.getImageProcess().getVersion().intValue(), 2);
73-
Assert.assertEquals(bucketProcess.getImageProcess().isDomainSupportAt(), null);
73+
Assert.assertEquals(bucketProcess.getImageProcess().isSupportAtStyle(), null);
7474

7575
// put 3
7676
imageProcess = new ImageProcess("Img", true, "*", "/", true);
@@ -84,7 +84,7 @@ public void testBucketImageProcessConf() {
8484
Assert.assertEquals(bucketProcess.getImageProcess().getSourceFileProtectSuffix(), "*");
8585
Assert.assertEquals(bucketProcess.getImageProcess().getStyleDelimiters(), "/");
8686
Assert.assertEquals(bucketProcess.getImageProcess().getVersion().intValue(), 2);
87-
Assert.assertEquals(bucketProcess.getImageProcess().isDomainSupportAt(), null);
87+
Assert.assertEquals(bucketProcess.getImageProcess().isSupportAtStyle(), null);
8888

8989
} catch (Exception e) {
9090
Assert.fail(e.getMessage());

0 commit comments

Comments
 (0)