🐛 修复当前存储引擎为空时, 与新设置的存储引擎比较出现的 NPE

This commit is contained in:
zhaojun1998
2020-01-08 22:32:47 +08:00
parent 2f0f41f413
commit 47e88849ac

View File

@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
import java.util.Objects;
import java.util.Set;
/**
@@ -58,7 +59,7 @@ public class AdminController {
systemConfigDTO.setId(1);
systemConfigService.updateSystemConfig(systemConfigDTO);
if (!currentStorageStrategy.equals(systemConfigDTO.getStorageStrategy())) {
if (!Objects.equals(currentStorageStrategy, systemConfigDTO.getStorageStrategy())) {
refreshStorageStrategy();
}