On 2/15/07, Edward Yakop <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have the following code
> <code>
>     Roles r = new Roles();
>     boolean hasAny = r.hasAnyRole( null );
> </code>
>
> Shouldn't this returned [true] as r doesn't have any roles?

I don't think it should. The javadoc says:

'Whether this roles object contains any of the provided roles.'

and I don't consider null being a specific role. So imo it should
never return true whenever null is passed in.

I could even argue that this method should throw an illegal argument
exception (that's not a proposal but something that would make just as
much sense to me).

Eelco

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to