final List<Role> roles = new ArrayList<Role>();
final Map<String, String> properties = new HashMap<String, String>();
if ( clientSubject == null ) {
name = ANONYMOUS;
roles.add( new Role() {
@Override
public String getName() {
return ANONYMOUS;
}
} );
} else {
name = clientSubject.getName();
for ( int i = 0; i < clientSubject.getRoles().length(); i++ ) {
final String roleName = clientSubject.getRoles().get( i );
roles.add( new Role() {
@Override
public String getName() {
return roleName;
}
} );