for (Iterator iterator = users.iterator(); iterator.hasNext();)
{
try
{
User user = (User)iterator.next();
if (user instanceof CachedUserImpl)
{
try
{
user = getUserModule().findUserById(user.getId());
}
catch(NoSuchUserException e)
{
throw new IdentityException("Illegal state - cached user doesn't exist in identity store: ", e);
}