mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-17 02:53:18 +01:00
Default null value in ConfigKey results in NPE on second start
This commit is contained in:
parent
13e7a7308b
commit
2e29c89b84
@ -25,13 +25,13 @@ import javax.annotation.PostConstruct;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import org.apache.cloudstack.framework.config.ConfigDepot;
|
||||
import org.apache.cloudstack.framework.config.ConfigDepotAdmin;
|
||||
import org.apache.cloudstack.framework.config.ConfigKey;
|
||||
import org.apache.cloudstack.framework.config.Configurable;
|
||||
import org.apache.cloudstack.framework.config.ScopedConfigStorage;
|
||||
import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
|
||||
import org.apache.commons.lang.ObjectUtils;
|
||||
|
||||
import com.cloud.utils.Pair;
|
||||
import com.cloud.utils.component.SystemIntegrityChecker;
|
||||
@ -97,10 +97,8 @@ public class ConfigDepotImpl implements ConfigDepot, ConfigDepotAdmin, SystemInt
|
||||
_configDao.persist(vo);
|
||||
} else {
|
||||
if (vo.isDynamic() != key.isDynamic() ||
|
||||
!vo.getDescription().equals(key.description()) ||
|
||||
((vo.getDefaultValue() != null && key.defaultValue() == null) ||
|
||||
(vo.getDefaultValue() == null && key.defaultValue() != null) ||
|
||||
!vo.getDefaultValue().equals(key.defaultValue()))) {
|
||||
!ObjectUtils.equals(vo.getDescription(), vo.getDescription()) ||
|
||||
!ObjectUtils.equals(vo.getDefaultValue(), key.defaultValue())) {
|
||||
vo.setDynamic(key.isDynamic());
|
||||
vo.setDescription(key.description());
|
||||
vo.setDefaultValue(key.defaultValue());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user