> On Sept. 25, 2012, 12:14 a.m., Alena Prokharchyk wrote: > > 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.
git blame>a56631bc (Saksham Srivastava 2012-09-12 19:16:16 +0530 1867) if ((user.getState().toString()).equals("enabled")) { +1 will change it right away. - Rohit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/7130/#review11872 ----------------------------------------------------------- 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 > >