mirror of https://github.com/halo-dev/halo
Fix NPE on HaloUtils.getDefaultQiniuZone method(issue: #110)
parent
168a320edc
commit
a1e15fea12
|
@ -62,9 +62,15 @@ public class HaloUtils {
|
||||||
*/
|
*/
|
||||||
@NonNull
|
@NonNull
|
||||||
public static Zone getDefaultQiniuZone() {
|
public static Zone getDefaultQiniuZone() {
|
||||||
Zone zone;
|
|
||||||
// Get zone from setting
|
// Get zone from setting
|
||||||
String qiniuZone = OPTIONS.get("qiniu_zone");
|
String qiniuZone = OPTIONS.get("qiniu_zone");
|
||||||
|
|
||||||
|
if (StrUtil.isBlank(qiniuZone)) {
|
||||||
|
return Zone.autoZone();
|
||||||
|
}
|
||||||
|
|
||||||
|
Zone zone;
|
||||||
|
|
||||||
switch (qiniuZone) {
|
switch (qiniuZone) {
|
||||||
case "z0":
|
case "z0":
|
||||||
zone = Zone.zone0();
|
zone = Zone.zone0();
|
||||||
|
|
Loading…
Reference in New Issue