lujiefsi commented on a change in pull request #2573: Cloudstack 10356
URL: https://github.com/apache/cloudstack/pull/2573#discussion_r182386542
 
 

 ##########
 File path: server/src/main/java/com/cloud/projects/ProjectManagerImpl.java
 ##########
 @@ -479,7 +479,7 @@ public void doInTransactionWithoutResult(TransactionStatus 
status) throws Resour
                 throw new InvalidParameterValueException("Unable to find 
account name=" + newOwnerName + " in domain id=" + project.getDomainId());
             }
             Account currentOwnerAccount = getProjectOwner(projectId);
-            if (currentOwnerAccount.getId() != futureOwnerAccount.getId()) {
+            if (currentOwnerAccount !=null && currentOwnerAccount.getId() != 
futureOwnerAccount.getId()) {
                 ProjectAccountVO futureOwner = 
_projectAccountDao.findByProjectIdAccountId(projectId, 
futureOwnerAccount.getAccountId());
 
 Review comment:
   Here, I think when currentOwnerAccount ==null, we should throw 
InvalidParameterValueException.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to