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?
If [true] should be the correct value
The following changes is needed.
<code>
public boolean hasAnyRole(Roles roles)
{
if (roles != null)
{
for (String role : roles)
{
if (hasRole(role))
{
return true;
}
}
}
return isEmpty(); // Modified line
}
</code>
Regards,
Edward Yakop
-------------------------------------------------------------------------
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