> On Sept. 18, 2012, 8:32 a.m., Nitin Mehta wrote:
> > server/src/com/cloud/user/AccountManagerImpl.java, line 1869
> > <https://reviews.apache.org/r/7130/diff/1/?file=155820#file155820line1869>
> >
> >     You are retrieving the user account again and again checking for null. 
> > Can we not have 1 db call for this ?

I just added a check so that it does not throw a NullPointerException.
Further, this kind of logic are at many places (where one db call could have 
played the trick).
It's required as we may have multiple accounts with the same name but on 
different domains.

How about we open another ticket on this issue (refactor multiple db calls in 
code to least number possible, make cloudstack faster?).


- Rohit


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/7130/#review11652
-----------------------------------------------------------


On Sept. 18, 2012, 8:29 a.m., Rohit Yadav wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/7130/
> -----------------------------------------------------------
> 
> (Updated Sept. 18, 2012, 8:29 a.m.)
> 
> 
> Review request for cloudstack, Abhinandan Prateek, Alena Prokharchyk, and 
> Alex Huang.
> 
> 
> Description
> -------
> 
> Issue: https://issues.apache.org/jira/browse/CLOUDSTACK-121
> 
> Download original patch and git am <patch>:
> http://bhaisaab.org/patches/cloudstack/0001-CLOUDSTACK-121-Fix-NullPointerException-for-incorrec.patch
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/user/AccountManagerImpl.java fa9fafb 
> 
> Diff: https://reviews.apache.org/r/7130/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Rohit Yadav
> 
>

Reply via email to