From continuum-users-return-269-apmail-maven-continuum-users-archive=maven.apache.org@maven.apache.org Mon Oct 24 22:21:59 2005 Return-Path: Delivered-To: apmail-maven-continuum-users-archive@www.apache.org Received: (qmail 622 invoked from network); 24 Oct 2005 22:21:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Oct 2005 22:21:59 -0000 Received: (qmail 33140 invoked by uid 500); 24 Oct 2005 22:21:58 -0000 Delivered-To: apmail-maven-continuum-users-archive@maven.apache.org Received: (qmail 33120 invoked by uid 500); 24 Oct 2005 22:21:58 -0000 Mailing-List: contact continuum-users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: continuum-users@maven.apache.org Delivered-To: mailing list continuum-users@maven.apache.org Received: (qmail 33104 invoked by uid 99); 24 Oct 2005 22:21:58 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Oct 2005 15:21:58 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [62.193.206.151] (HELO mailsender.amenworld.com) (62.193.206.151) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Oct 2005 15:21:56 -0700 Received: from webmail9.amenworld.com (webmail9.amenworld.com [62.193.206.9]) by mailsender.amenworld.com (Postfix) with SMTP id 078519AD6B9 for ; Tue, 25 Oct 2005 00:21:37 +0200 (CEST) Received: (qmail 7145 invoked from network); 24 Oct 2005 22:21:39 -0000 Received: from 26.29.99-84.rev.gaoland.net (HELO ?127.0.0.1?) (84.99.29.26) by 0 with SMTP; 24 Oct 2005 22:21:39 -0000 Message-ID: <435D5E6C.80908@venisse.net> Date: Tue, 25 Oct 2005 00:21:32 +0200 From: Emmanuel Venisse User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: fr, en MIME-Version: 1.0 To: continuum-users@maven.apache.org Subject: Re: NPE in InitializerChecker when guest account is disabled References: <435D5BAA.7020800@gmail.com> In-Reply-To: <435D5BAA.7020800@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N It's fixed in trunk Emmanuel Eli Doran a écrit : > I just setup Continuum and received a NullPointerException when trying > to use disabled guest option. The problem is in > org.apache.maven.continuum.web.action.InitializationChecker at line > 164. I've included the neighboring lines below. The UserGroup is not > checked whether it is null so the call "guestGroup.setPermissions(null)" > causes the NPE. The same problem happens on my WinXP and Fedora Linux > machines. Did I do something wrong? Am I missing something. All I had to > do was check the guests box and it works fine. > > Thank you, > ~eli > > boolean guestAccountEnabled = getBooleanValue( map, > "guestAccountEnabled" ); > > if ( guestAccountEnabled ) > { > configuration.setGuestAccountEnabled( guestAccountEnabled ); > } > else > { > UserGroup guestGroup = store.getUserGroup( "guest" ); > > --> guestGroup.setPermissions( null ); !!!! This causes the NPE !!!! > > store.updateUserGroup( guestGroup ); > } > > > >