You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@continuum.apache.org by Eli Doran <el...@gmail.com> on 2005/10/25 00:09:46 UTC
NPE in InitializerChecker when guest account is disabled
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 );
}
Re: NPE in InitializerChecker when guest account is disabled
Posted by Emmanuel Venisse <em...@venisse.net>.
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 );
> }
>
>
>
>