Simon Godard created CLOUDSTACK-9258:
----------------------------------------
Summary: listDomains API fails with NPE when getVolumeTotal is null
Key: CLOUDSTACK-9258
URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9258
Project: CloudStack
Issue Type: Bug
Security Level: Public (Anyone can view this level - this is the default.)
Components: API
Affects Versions: 4.7.1
Reporter: Simon Godard
One of my Domain failed to delete recently and we noticed a bad side-effects
with the *listDomains* API.
It fails with the following NPE:
{noformat}
2016-01-28 13:29:54,206 ERROR [com.cloud.api.ApiServer]
(catalina-exec-23:ctx-e5e58a26 ctx-71c806be) unhandled exception executing api
command: [Ljava.lang.String;@5c34e27
java.lang.NullPointerException
at
com.cloud.api.query.dao.DomainJoinDaoImpl.setResourceLimits(DomainJoinDaoImpl.java:113)
at
com.cloud.api.query.dao.DomainJoinDaoImpl.newDomainResponse(DomainJoinDaoImpl.java:76)
{noformat}
The problem is caused by a missing null check in combination with auto-boxing.
Only the *volumeTotal* count is affected.
https://github.com/apache/cloudstack/blob/master/server/src/com/cloud/api/query/dao/DomainJoinDaoImpl.java#L113
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)