Re: NPE in ScarabModule.compareTo
Mick Semb Wever <[email protected]>
| Newsgroups | gmane.comp.java.scarab.devel |
|---|---|
| Message-ID | <[email protected]> |
> How is null entries getting into the groups list returned by
> ScarabModulePeer.doSelect(criteria);
> that is called in ScarabDBSecurityService.getGroups(..)
It's not a null entry but a group without a name, which supports my
suspecion that it's related to the empty TURBINE_GROUP.
But... TURBINE_GROUP looks to have always been empty, so how this ever
worked i'm stumped!
Adding to the compareTo method the checks against null:
> if(null == name1 && null == name2){ return 0; }
> if(null == name1){ return -1; }
> if(null == name2){ return 1; }
> return name2.compareTo(name1);
fixes the exception.
But both the anonymous and Administrator user have lost all their
roles :'(
I'm going to test against a new scarab install, but in the meantime if
anyone knows what it is that i obviously don't...
~mck
--
"Microsoft bought MS-DOS from a Seattle company, and it was called QDOS
then
(Quick and Dirty Operating System). Some say it is not quick anymore, but
the rest stays the same." WILSON ROBERTO AFONSO
| www.semb.wever.org | www.sesat.no | www.sesam.no |