CID-1233085: Fix potential NPE in AccountManagerImpl from VpcManagerImpl

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2014-09-17 15:56:03 +02:00
parent 33a6640c04
commit c27dd6293e

View File

@ -1421,7 +1421,9 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager, VpcProvis
@Override
public List<? extends Vpc> getVpcsForAccount(long accountId) {
return _vpcDao.listByAccountId(accountId);
List<Vpc> vpcs = new ArrayList<Vpc>();
vpcs.addAll(_vpcDao.listByAccountId(accountId));
return vpcs;
}
public boolean cleanupVpcResources(long vpcId, Account caller, long callerUserId) throws ResourceUnavailableException, ConcurrentOperationException {