Return-Path: X-Original-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F07969B79 for ; Tue, 25 Sep 2012 03:44:30 +0000 (UTC) Received: (qmail 48741 invoked by uid 500); 25 Sep 2012 03:44:30 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 48332 invoked by uid 500); 25 Sep 2012 03:44:29 -0000 Mailing-List: contact cloudstack-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-dev@incubator.apache.org Received: (qmail 48278 invoked by uid 99); 25 Sep 2012 03:44:27 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Sep 2012 03:44:27 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 6F7201C430C; Tue, 25 Sep 2012 03:44:26 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============0927962414062094845==" MIME-Version: 1.0 Subject: Re: Review Request: CLOUDSTACK-121: FIx NullPointerException while logging in From: "Rohit Yadav" To: "Alex Huang" , "Abhinandan Prateek" , "Alena Prokharchyk" Cc: "cloudstack" , "Rohit Yadav" Date: Tue, 25 Sep 2012 03:44:26 -0000 Message-ID: <20120925034426.18991.7526@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Rohit Yadav" X-ReviewGroup: cloudstack X-ReviewRequest-URL: https://reviews.apache.org/r/7130/ X-Sender: "Rohit Yadav" References: <20120925001457.18994.54769@reviews.apache.org> In-Reply-To: <20120925001457.18994.54769@reviews.apache.org> Reply-To: "Rohit Yadav" --===============0927962414062094845== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable > On Sept. 25, 2012, 12:14 a.m., Alena Prokharchyk wrote: > > Rohit, I wouldn't advise to use hardcoded values when compare cloudStac= k 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 o= ut 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 : > http://bhaisaab.org/patches/cloudstack/0001-CLOUDSTACK-121-Fix-NullPointe= rException-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 > = > --===============0927962414062094845==--