for (Iterator iterator = grantedRoles.iterator(); iterator.hasNext();) {
String role = (String) iterator.next();
for (Iterator grantedIterator = granted.iterator();
grantedIterator.hasNext();) {
GrantedAuthority authority = (GrantedAuthority) grantedIterator
.next();
if (authority.getauthority().equals(role)) {
target.add(authority);
break;
}
}