@Override
  public Set<? extends String> getRoles(final Principal[] principals) throws PolicyContextException {
    final String cn = this.getClass().getName();
    final Logger logger = Logger.getLogger(cn);
    if (logger != null && logger.isLoggable(Level.FINER)) {
      logger.entering(cn, "getRoles", java.util.Arrays.toString(principals));
    }
    Set<String> returnValue = null;
    final RoleMapper roleMapper = this.getRoleMapper();
    if (roleMapper != null) {
      returnValue = roleMapper.getRoles(principals);
    }
    if (returnValue == null) {
      returnValue = Collections.emptySet();
    }
    if (logger != null) {
      if (logger.isLoggable(Level.FINE)) {
        logger.logp(Level.FINE, cn, "getRoles", "{0} --bound to roles--> {1}", new Object[] { java.util.Arrays.toString(principals), returnValue });
      }
    }
    if (logger != null && logger.isLoggable(Level.FINER)) {
      logger.exiting(cn, "getRoles", returnValue);
    }
    return returnValue;
  }