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


Rohit, I wouldn't advise to use hardcoded values when compare cloudStack object 
states:

 if ((userAccount.getState().toString()).equals("enabled")) 

otherwise once we decide to change the name from "enabled" to something else in 
the future, you have to parse the entire cloudStack code to find out where this 
value is used. Plus you might run into case issues as you use equals instead of 
equalsIgnoreCase.

There is an enum State in Account class. Please fix the code to make a 
comparison against particular enum values.

- Alena Prokharchyk


On Sept. 18, 2012, 9:43 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, 9:43 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
> -----
> 
>   api/src/com/cloud/user/UserAccount.java 734e16b 
>   server/src/com/cloud/user/AccountManagerImpl.java fa9fafb 
> 
> Diff: https://reviews.apache.org/r/7130/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Rohit Yadav
> 
>

Reply via email to