// recover principles
Enumeration<Principal> users = r.getUsersAssignedTo(new Role(role));
Set<Principal> usersToRole = new HashSet<Principal>();
for (; users.hasMoreElements();) {
PrincipalImpl gp = (PrincipalImpl) users.nextElement();
usersToRole.add(new PrincipalImpl(gp.getName()));
addRoleToPrincipal(gp, role);
}
this.roleToPrincipal.put(role, usersToRole);
}
}