}
if ( mappedRolesList.size() > 0 ) {
// We were able to map the roles - return the mappings.
return mappedRolesList.toArray( new String[mappedRolesList.size()] );
} else if ( failOnEmptyRoleList ) {
throw new PentahoAccessControlException( Messages.getInstance().getErrorString(
"MondrianOneToOneUserRoleListMapper.ERROR_001_NO_CORRESPONDENCE" ) ); //$NON-NLS-1$
} else {
return null;
}
}