while (iter.hasNext()) {
ConfigAttribute attribute = (ConfigAttribute) iter.next();
if (this.supports(attribute)) {
GrantedAuthorityImpl extraauthority = new GrantedAuthorityImpl(getRolePrefix()
+ attribute.getAttribute());
newauthorities.add(extraauthority);
}
}
if (newauthorities.size() == 0) {
return null;
} else {
for (int i = 0; i < authentication.getauthorities().length; i++) {
newauthorities.add(authentication.getauthorities()[i]);
}
GrantedAuthority[] resultType = {new GrantedAuthorityImpl("holder")};
GrantedAuthority[] newauthoritiesAsArray = (GrantedAuthority[]) newauthorities
.toArray(resultType);
return new RunAsUserToken(this.key, authentication.getPrincipal(),
authentication.getCredentials(), newauthoritiesAsArray,