@@ -19,6 +19,13 @@ public final class FixedZone extends Zone {
1919 new String []{"upload.qbox.me" , "up.qbox.me" },
2020 "z0" );
2121
22+ /**
23+ * 华东浙江 2 机房
24+ */
25+ public static final Zone zoneCnEast2 = new FixedZone (new String []{"upload-cn-east-2.qiniup.com" , "up-cn-east-2.qiniup.com" },
26+ null ,
27+ "cn-east-2" );
28+
2229 /**
2330 * 华北机房
2431 */
@@ -33,6 +40,13 @@ public final class FixedZone extends Zone {
3340 new String []{"upload-z2.qbox.me" , "up-z2.qbox.me" },
3441 "z2" );
3542
43+ /**
44+ * 首尔机房
45+ */
46+ public static final Zone zoneApNorthEast1 = new FixedZone (new String []{"upload-ap-northeast-1.qiniup.com" , "up-ap-northeast-1.qiniup.com" },
47+ null ,
48+ "ap-northeast-1" );
49+
3650 /**
3751 * 北美机房
3852 */
@@ -47,29 +61,16 @@ public final class FixedZone extends Zone {
4761 new String []{"upload-as0.qbox.me" , "up-as0.qbox.me" },
4862 "as0" );
4963
50- /**
51- * zone fog-cn-east-1 雾存储 华东-1
52- * 分片上传暂时仅支持分片 api v2
53- * 分片 api v2设置方式:配置 Configuration 的 resumeUploadVersion 为 Configuration.RESUME_UPLOAD_VERSION_V2
54- * eg:
55- * Configuration configuration = new Configuration.Builder()
56- * .resumeUploadVersion(Configuration.RESUME_UPLOAD_VERSION_V2)
57- * .build();
58- *
59- * @return 实例
60- */
61- public static final Zone zoneFogCnEast1 = new FixedZone (new String []{"upload-fog-cn-east-1.qiniup.com" , "up-fog-cn-east-1.qiniup.com" },
62- new String []{"upload-fog-cn-east-1.qiniup.com" , "up-fog-cn-east-1.qiniup.com" },
63- "fog-cn-east-1" );
64-
6564 private ZonesInfo zonesInfo ;
6665
6766 public static FixedZone localsZoneInfo () {
6867 ArrayList <FixedZone > localsZone = new ArrayList <>();
6968 localsZone .add ((FixedZone )zone0 );
69+ localsZone .add ((FixedZone )zoneCnEast2 );
7070 localsZone .add ((FixedZone )zone1 );
7171 localsZone .add ((FixedZone )zone2 );
7272 localsZone .add ((FixedZone )zoneNa0 );
73+ localsZone .add ((FixedZone )zoneApNorthEast1 );
7374 localsZone .add ((FixedZone )zoneAs0 );
7475
7576 ArrayList <ZoneInfo > zoneInfoArray = new ArrayList <>();
@@ -115,9 +116,12 @@ private ZonesInfo createZonesInfo(String[] upDomains,
115116
116117 List <String > upDomainsList = new ArrayList <String >(Arrays .asList (upDomains ));
117118 List <String > oldUpDomainsList = null ;
118- if (oldUpDomains != null ){
119+ if (oldUpDomains != null && oldUpDomains . length > 0 ){
119120 oldUpDomainsList = new ArrayList <String >(Arrays .asList (oldUpDomains ));
121+ } else {
122+ oldUpDomainsList = new ArrayList <>();
120123 }
124+
121125 ZoneInfo zoneInfo = ZoneInfo .buildInfo (upDomainsList , oldUpDomainsList , regionId );
122126 if (zoneInfo == null ) {
123127 return null ;
0 commit comments