CLOUDSTACK-7219 added nullcheck to config retrieval

This commit is contained in:
Daan Hoogland 2014-10-02 11:12:55 +02:00
parent 9eb86560c9
commit 08b9a96b7c
1 changed files with 5 additions and 3 deletions

View File

@ -1703,9 +1703,11 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
List<ConfigurationVO> configVOList = new ArrayList<ConfigurationVO>();
for (ConfigurationVO param : result.first()) {
ConfigurationVO configVo = _configDao.findByName(param.getName());
configVo.setValue(_configDepot.get(param.getName()).valueIn(id).toString());
configVOList.add(configVo);
}
if (configVo != null) {
configVo.setValue(_configDepot.get(param.getName()).valueIn(id).toString());
configVOList.add(configVo);
}
}
return new Pair<List<? extends Configuration>, Integer>(configVOList, configVOList.size());
}