boolean trace = log.isTraceEnabled();
   public boolean authorize(String user, Set rolePrincipals)   {      boolean trace = log.isTraceEnabled();      if (trace) { log.trace("authorizing user " + user + " for role(s) " + rolePrincipals.toString()); }      Principal principal = user == null ? null : new SimplePrincipal(user);      boolean hasRole = realmMapping.doesUserHaveRole(principal, rolePrincipals);      if (trace) { log.trace("user " + user + (hasRole ? " is " : " is NOT ") + "authorized"); }      return hasRole;   }